|
Jan Kratochvil |
046f33b |
From: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
|
Jan Kratochvil |
046f33b |
[PATCH 2/6] fortran: combine subarray and string computation
|
|
Jan Kratochvil |
046f33b |
https://sourceware.org/ml/gdb-patches/2015-12/msg00010.html
|
|
Jan Kratochvil |
046f33b |
Message-Id: <1448976075-11456-3-git-send-email-christoph.t.weinmann@intel.com>
|
|
Jan Kratochvil |
046f33b |
|
|
Jan Kratochvil |
046f33b |
Strings only have one dimension, but the element computation is
|
|
Jan Kratochvil |
046f33b |
identical to the subarray computation for ranges and indices.
|
|
Jan Kratochvil |
046f33b |
|
|
Jan Kratochvil |
046f33b |
2013-11-26 Christoph Weinmann <christoph.t.weinmann@intel.com>
|
|
Jan Kratochvil |
046f33b |
|
|
Jan Kratochvil |
046f33b |
* eval.c (evaluate_subexp_standard): Call
|
|
Jan Kratochvil |
046f33b |
value_f90_subarray for print expressions on array and
|
|
Jan Kratochvil |
046f33b |
string types.
|
|
Jan Kratochvil |
046f33b |
|
|
Jan Kratochvil |
046f33b |
|
|
Jan Kratochvil |
046f33b |
|
|
Jan Kratochvil |
046f33b |
Signed-off-by: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
|
Jan Kratochvil |
046f33b |
---
|
|
Jan Kratochvil |
046f33b |
gdb/eval.c | 10 +---------
|
|
Jan Kratochvil |
046f33b |
1 files changed, 1 insertions(+), 9 deletions(-)
|
|
Jan Kratochvil |
046f33b |
|
|
Jan Kratochvil |
046f33b |
diff --git a/gdb/eval.c b/gdb/eval.c
|
|
Jan Kratochvil |
046f33b |
index 2ceccbc..0c1b607 100644
|
|
Jan Kratochvil |
046f33b |
--- a/gdb/eval.c
|
|
Jan Kratochvil |
046f33b |
+++ b/gdb/eval.c
|
|
Jan Kratochvil |
046f33b |
@@ -2034,16 +2034,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|
Jan Kratochvil |
046f33b |
switch (code)
|
|
Jan Kratochvil |
046f33b |
{
|
|
Jan Kratochvil |
046f33b |
case TYPE_CODE_ARRAY:
|
|
Jan Kratochvil |
046f33b |
- return value_f90_subarray (arg1, exp, pos, nargs, noside);
|
|
Jan Kratochvil |
046f33b |
-
|
|
Jan Kratochvil |
046f33b |
case TYPE_CODE_STRING:
|
|
Jan Kratochvil |
046f33b |
- if (exp->elts[*pos].opcode == OP_F90_RANGE)
|
|
Jan Kratochvil |
046f33b |
- return value_f90_subarray (arg1, exp, pos, 1, noside);
|
|
Jan Kratochvil |
046f33b |
- else
|
|
Jan Kratochvil |
046f33b |
- {
|
|
Jan Kratochvil |
046f33b |
- arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
|
|
Jan Kratochvil |
046f33b |
- return value_subscript (arg1, value_as_long (arg2));
|
|
Jan Kratochvil |
046f33b |
- }
|
|
Jan Kratochvil |
046f33b |
+ return value_f90_subarray (arg1, exp, pos, nargs, noside);
|
|
Jan Kratochvil |
046f33b |
|
|
Jan Kratochvil |
046f33b |
case TYPE_CODE_PTR:
|
|
Jan Kratochvil |
046f33b |
case TYPE_CODE_FUNC:
|
|
Jan Kratochvil |
046f33b |
--
|
|
Jan Kratochvil |
046f33b |
1.7.0.7
|