aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Zhou <woodzltc@cn.ibm.com>2005-09-20 06:25:34 +0000
committerWu Zhou <woodzltc@cn.ibm.com>2005-09-20 06:25:34 +0000
commit0b4e13251c935cb507296127d8af1c78fc627bd5 (patch)
tree2d9566d8763fb091f28846503023d46c7a5a899d /gdb/f-lang.h
parent2005-09-19 David Edelsohn <edelsohn@gnu.org> (diff)
downloadbinutils-gdb-0b4e13251c935cb507296127d8af1c78fc627bd5.tar.gz
binutils-gdb-0b4e13251c935cb507296127d8af1c78fc627bd5.tar.bz2
binutils-gdb-0b4e13251c935cb507296127d8af1c78fc627bd5.zip
* expression.h (enum exp_opcode): Add a new operator for F90
subrange. * f-lang.h (enum f90_range_type): New enumeration type to identify F90 subrange type. * f-exp.y (yyparse): Add support for parsing F90 subrange and change substring parsing to subrange parsing. * parse.c (operator_length_standard): Set the operator length and args number for OP_F90_RANGE. * eval.c (evaluate_subexp_standard): Add code to evaluate F90 array section and substring. (value_f90_subarray): New function to evaluate F90 array section. (evaluate_subexp_standard): Delete label op_f77_substr and its code because the logic is implemented by function value_f90_subarray now.
Diffstat (limited to 'gdb/f-lang.h')
-rw-r--r--gdb/f-lang.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/f-lang.h b/gdb/f-lang.h
index 6145cb50f7a..ddc0e89dcba 100644
--- a/gdb/f-lang.h
+++ b/gdb/f-lang.h
@@ -36,6 +36,19 @@ extern int f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
/* Language-specific data structures */
+/* In F90 subrange expression, either bound could be empty, indicating that
+ its value is by default that of the corresponding bound of the array or
+ string. So we have four sorts of subrange in F90. This enumeration type
+ is to identify this. */
+
+enum f90_range_type
+ {
+ BOTH_BOUND_DEFAULT, /* "(:)" */
+ LOW_BOUND_DEFAULT, /* "(:high)" */
+ HIGH_BOUND_DEFAULT, /* "(low:)" */
+ NONE_BOUND_DEFAULT /* "(low:high)" */
+ };
+
struct common_entry
{
struct symbol *symbol; /* The symbol node corresponding