aboutsummaryrefslogtreecommitdiff
path: root/gdb/expression.h
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1995-02-12 19:21:04 +0000
committerPer Bothner <per@bothner.com>1995-02-12 19:21:04 +0000
commit7398958c7d7356235a818cca7da57d9377ee0556 (patch)
treec024f941aea7b6d4eb7ae6ca15fa7403aa3c4edc /gdb/expression.h
parent60438e8e3e963c5d06ffb85d30ec74d680b06f24 (diff)
downloadgdb-7398958c7d7356235a818cca7da57d9377ee0556.zip
gdb-7398958c7d7356235a818cca7da57d9377ee0556.tar.gz
gdb-7398958c7d7356235a818cca7da57d9377ee0556.tar.bz2
* language.h (struct language_defn): New field evaluate_exp.
* c-lang.c (c_language_defn, cplus_language_defn, asm_langauge_defn), f-lang.c (f_language_defn), language.c (unknown_language_defn, auto_language_defn, local_language_defn), m2-lang.c (m2_language_defn): Set evaluate_exp to evaluate_subexp_standard. * ch-lang.c (evaluate_subexp_chill): New function. Chill-specific support for MULTI_SUBSCRIPT. (chill_language_defn): Set evaluate_exp to evaluate_subexp_chill. * eval.c (enum noside): Move from here .... * expression.h (enum noside): ... to here. (evaluate_subexp_standard): New prototype. * eval.c (evaluate_subexp): Renamed to evaluate_subexp_standard. Removed lo-longer-needed test for chill_varying_type. (evaluate_subexp): New. Calls exp->language_defn->evaluate_exp.
Diffstat (limited to 'gdb/expression.h')
-rw-r--r--gdb/expression.h34
1 files changed, 22 insertions, 12 deletions
diff --git a/gdb/expression.h b/gdb/expression.h
index 6a166db..3a08e12 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -132,13 +132,6 @@ enum exp_opcode
by each of the next following subexpressions, one per dimension. */
MULTI_SUBSCRIPT,
- /* For Fortran array subscripting (column major style). Like the
- Modula operator, we find that the dimensionality is
- encoded in the operator. This operator is distinct
- from the above one because it uses column-major array
- ordering not row-major. */
- MULTI_F77_SUBSCRIPT,
-
/* The OP_... series take immediate following arguments.
After the arguments come another OP_... (the same one)
so that the grouping can be recognized from the end. */
@@ -193,11 +186,6 @@ enum exp_opcode
literal. It is followed by exactly two args that are doubles. */
OP_COMPLEX,
- /* The following OP introduces a F77 substring operator.
- It should have a string type and two integer types that follow
- indicating the "from" and "to" for the substring. */
- OP_F77_SUBSTR,
-
/* OP_STRING represents a string constant.
Its format is the same as that of a STRUCTOP, but the string
data is just made into a string constant when the operation
@@ -342,6 +330,28 @@ extern struct expression *parse_exp_1 PARAMS ((char **, struct block *, int));
parse_<whatever>, then look at it. */
extern struct block *innermost_block;
+/* From eval.c */
+
+/* Values of NOSIDE argument to eval_subexp. */
+
+enum noside
+{
+ EVAL_NORMAL,
+ EVAL_SKIP, /* Only effect is to increment pos. */
+ EVAL_AVOID_SIDE_EFFECTS /* Don't modify any variables or
+ call any functions. The value
+ returned will have the correct
+ type, and will have an
+ approximately correct lvalue
+ type (inaccuracy: anything that is
+ listed as being in a register in
+ the function in which it was
+ declared will be lval_register). */
+};
+
+extern struct value* evaluate_subexp_standard
+PARAMS ((struct type *, struct expression *, int*, enum noside));
+
/* From expprint.c */
extern void print_expression PARAMS ((struct expression *, GDB_FILE *));