From 0c8effa32e9326ca80f3e7cd74635e1dc44b3db5 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 8 Mar 2021 07:27:57 -0700 Subject: Introduce var_msym_value_operation This adds class var_msym_value_operation, which implements OP_VAR_MSYM_VALUE. A new method is added to class operation in order to support a special case in minsym evaluation. gdb/ChangeLog 2021-03-08 Tom Tromey * expression.h (class operation) : New method. * expop.h (class var_msym_value_operation): New. * eval.c (eval_op_var_msym_value): No longer static. (var_msym_value_operation::evaluate_for_address) (var_msym_value_operation::evaluate_for_sizeof) (var_msym_value_operation::evaluate_for_cast): New methods. * ax-gdb.c (var_msym_value_operation::do_generate_ax): New method. --- gdb/expression.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/expression.h') diff --git a/gdb/expression.h b/gdb/expression.h index 24a0eb3..4d75058 100644 --- a/gdb/expression.h +++ b/gdb/expression.h @@ -165,6 +165,10 @@ public: /* Print this operation to STREAM. */ virtual void dump (struct ui_file *stream, int depth) const = 0; + /* Call to indicate that this is the outermost operation in the + expression. This should almost never be overridden. */ + virtual void set_outermost () { } + protected: /* Called by generate_ax to do the work for this particular -- cgit v1.1