aboutsummaryrefslogtreecommitdiff
path: root/gdb/expression.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-04-28 07:26:44 -0600
committerTom Tromey <tromey@adacore.com>2023-05-01 11:04:13 -0600
commitba71385e7f8824849f5a1f3d77bd5f03928138eb (patch)
treee15d8a1ffcb564d8def235f15eaa7e65d3f1f835 /gdb/expression.h
parent43048e46db188e546ba2107bdffcc7eb751c91df (diff)
downloadbinutils-ba71385e7f8824849f5a1f3d77bd5f03928138eb.zip
binutils-ba71385e7f8824849f5a1f3d77bd5f03928138eb.tar.gz
binutils-ba71385e7f8824849f5a1f3d77bd5f03928138eb.tar.bz2
Remove evaluate_type
Like evaluate_expression, evaluate_type is also just a simple wrapper. Removing it makes the code a little nicer.
Diffstat (limited to 'gdb/expression.h')
-rw-r--r--gdb/expression.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/expression.h b/gdb/expression.h
index 5bfb051..e6e4bec 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -225,6 +225,11 @@ struct expression
struct value *evaluate (struct type *expect_type = nullptr,
enum noside noside = EVAL_NORMAL);
+ /* Evaluate an expression, avoiding all memory references
+ and getting a value whose type alone is correct. */
+ struct value *evaluate_type ()
+ { return evaluate (nullptr, EVAL_AVOID_SIDE_EFFECTS); }
+
/* Language it was entered in. */
const struct language_defn *language_defn;
/* Architecture it was parsed in. */