|
|
be09dc |
http://sourceware.org/ml/gdb-patches/2016-02/msg00841.html
|
|
|
be09dc |
Subject: [PATCH v2 2/6] fortran: combine subarray and string computation
|
|
|
be09dc |
|
|
|
be09dc |
From: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
|
|
be09dc |
|
|
|
be09dc |
Strings only have one dimension, but the element computation is
|
|
|
be09dc |
identical to the subarray computation for ranges and indices.
|
|
|
be09dc |
|
|
|
be09dc |
2013-11-26 Christoph Weinmann <christoph.t.weinmann@intel.com>
|
|
|
be09dc |
|
|
|
be09dc |
* eval.c (evaluate_subexp_standard): Call
|
|
|
be09dc |
value_f90_subarray for print expressions on array and
|
|
|
be09dc |
string types.
|
|
|
be09dc |
|
|
|
be09dc |
|
|
|
be09dc |
Signed-off-by: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
|
|
be09dc |
---
|
|
|
be09dc |
gdb/eval.c | 10 +---------
|
|
|
be09dc |
1 file changed, 1 insertion(+), 9 deletions(-)
|
|
|
be09dc |
|
|
|
be09dc |
diff --git a/gdb/eval.c b/gdb/eval.c
|
|
|
be09dc |
index c9f325f..164d7ab 100644
|
|
|
be09dc |
--- a/gdb/eval.c
|
|
|
be09dc |
+++ b/gdb/eval.c
|
|
|
be09dc |
@@ -2034,16 +2034,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|
|
be09dc |
switch (code)
|
|
|
be09dc |
{
|
|
|
be09dc |
case TYPE_CODE_ARRAY:
|
|
|
be09dc |
- return value_f90_subarray (arg1, exp, pos, nargs, noside);
|
|
|
be09dc |
-
|
|
|
be09dc |
case TYPE_CODE_STRING:
|
|
|
be09dc |
- if (exp->elts[*pos].opcode == OP_F90_RANGE)
|
|
|
be09dc |
- return value_f90_subarray (arg1, exp, pos, 1, noside);
|
|
|
be09dc |
- else
|
|
|
be09dc |
- {
|
|
|
be09dc |
- arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
|
|
|
be09dc |
- return value_subscript (arg1, value_as_long (arg2));
|
|
|
be09dc |
- }
|
|
|
be09dc |
+ return value_f90_subarray (arg1, exp, pos, nargs, noside);
|
|
|
be09dc |
|
|
|
be09dc |
case TYPE_CODE_PTR:
|
|
|
be09dc |
case TYPE_CODE_FUNC:
|
|
|
be09dc |
--
|
|
|
be09dc |
2.5.0
|
|
|
be09dc |
|