diff options
author | Christoph Weinmann <christoph.t.weinmann@intel.com> | 2015-11-13 09:00:33 +0100 |
---|---|---|
committer | Bernhard Heckel <bernhard.heckel@intel.com> | 2016-09-07 12:08:44 +0200 |
commit | 75d2491453a4224be083aaf15cfd3865443dcfd3 (patch) | |
tree | 7d0f88f83777676aa43eb0e786f4d1792a2932cf | |
parent | 47a78fe009c871ec5f4d471d1d5739dbb129af61 (diff) | |
download | gdb-75d2491453a4224be083aaf15cfd3865443dcfd3.zip gdb-75d2491453a4224be083aaf15cfd3865443dcfd3.tar.gz gdb-75d2491453a4224be083aaf15cfd3865443dcfd3.tar.bz2 |
fortran: combine subarray and string computation
Strings types are handled like array types with only one dimension.
Therefore the same algorithm to calculate subsets is used.
2013-11-26 Christoph Weinmann <christoph.t.weinmann@intel.com>
* eval.c (evaluate_subexp_standard): Call
value_f90_subarray for print expressions on array and
string types.
Signed-off-by: Christoph Weinmann <christoph.t.weinmann@intel.com>
-rw-r--r-- | gdb/eval.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -2035,16 +2035,8 @@ evaluate_subexp_standard (struct type *expect_type, switch (code) { case TYPE_CODE_ARRAY: - return value_f90_subarray (arg1, exp, pos, nargs, noside); - case TYPE_CODE_STRING: - if (exp->elts[*pos].opcode == OP_RANGE) - return value_f90_subarray (arg1, exp, pos, 1, noside); - else - { - arg2 = evaluate_subexp_with_coercion (exp, pos, noside); - return value_subscript (arg1, value_as_long (arg2)); - } + return value_f90_subarray (arg1, exp, pos, nargs, noside); case TYPE_CODE_PTR: case TYPE_CODE_FUNC: |