diff options
author | Christoph Weinmann <christoph.t.weinmann@intel.com> | 2016-06-01 15:11:24 +0200 |
---|---|---|
committer | Bernhard Heckel <bernhard.heckel@intel.com> | 2016-09-07 12:08:47 +0200 |
commit | ef4f0c7dc7d0a0ad2f2941ae8035da63756352ec (patch) | |
tree | 22f7c308b24b86525171638f585933275c0b601a /gdb/expression.h | |
parent | 57113d3763d3890eef283e53706c6654b017ab51 (diff) | |
download | gdb-ef4f0c7dc7d0a0ad2f2941ae8035da63756352ec.zip gdb-ef4f0c7dc7d0a0ad2f2941ae8035da63756352ec.tar.gz gdb-ef4f0c7dc7d0a0ad2f2941ae8035da63756352ec.tar.bz2 |
fortran: enable parsing of stride parameter for subranges
Allow the user to provide a stride parameter for Fortran
subarrays. The stride parameter can be any integer except
'0'. The default stride value is '1'.
2013-11-27 Christoph Weinmann <christoph.t.weinmann@intel.com>
* eval.c (value_f90_subarray): Add expression evaluation
for a stride parameter in a Fortran range expression.
* expression.h (range_type): Add field to enum to show when
a stride value was provided by the user.
* f-exp.y: Add yacc rules for writing info on the elt stack
when the user provided a stride argument.
* parse.c (operator_length_standard): Check if a stride
value was provided, and increment argument counter
accordingly.
Signed-off-by: Christoph Weinmann <christoph.t.weinmann@intel.com>
Diffstat (limited to 'gdb/expression.h')
-rw-r--r-- | gdb/expression.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/expression.h b/gdb/expression.h index 5a6b720..34ca54b 100644 --- a/gdb/expression.h +++ b/gdb/expression.h @@ -153,13 +153,16 @@ extern void dump_raw_expression (struct expression *, extern void dump_prefix_expression (struct expression *, struct ui_file *); /* In an OP_RANGE expression, either bound can be provided by the user, or not. - This enumeration type is to identify this. */ + In addition to this, the user can also specify a stride value to indicated + only certain elements of the array. This enumeration type is to identify + this. */ enum range_type { SUBARRAY_NONE_BOUND = 0x0, /* "( : )" */ SUBARRAY_LOW_BOUND = 0x1, /* "(low:)" */ - SUBARRAY_HIGH_BOUND = 0x2 /* "(:high)" */ + SUBARRAY_HIGH_BOUND = 0x2, /* "(:high)" */ + SUBARRAY_STRIDE = 0x4 /* "(::stride)" */ }; #endif /* !defined (EXPRESSION_H) */ |