diff options
author | Tom Tromey <tromey@adacore.com> | 2023-04-28 07:24:59 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-05-01 11:04:13 -0600 |
commit | 43048e46db188e546ba2107bdffcc7eb751c91df (patch) | |
tree | c7c8470c5d69cdac5657f5413ad1d1a185e38775 /gdb/printcmd.c | |
parent | b785bb6d1869657ec26003b97548bdd4bde43c90 (diff) | |
download | gdb-43048e46db188e546ba2107bdffcc7eb751c91df.zip gdb-43048e46db188e546ba2107bdffcc7eb751c91df.tar.gz gdb-43048e46db188e546ba2107bdffcc7eb751c91df.tar.bz2 |
Remove evaluate_expression
evaluate_expression is just a little wrapper for a method on
expression. Removing it also removes a lot of ugly (IMO) calls to
get().
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r-- | gdb/printcmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index f6d5bad..e903bf4 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1316,7 +1316,7 @@ process_print_command_args (const char *args, value_print_options *print_opts, /* VOIDPRINT is true to indicate that we do want to print a void value, so invert it for parse_expression. */ expression_up expr = parse_expression (exp, nullptr, !voidprint); - return evaluate_expression (expr.get ()); + return expr->evaluate (); } return access_value_history (0); @@ -1495,7 +1495,7 @@ output_command (const char *exp, int from_tty) expression_up expr = parse_expression (exp); - val = evaluate_expression (expr.get ()); + val = expr->evaluate (); annotate_value_begin (val->type ()); @@ -1534,7 +1534,7 @@ set_command (const char *exp, int from_tty) (_("Expression is not an assignment (and might have no effect)")); } - evaluate_expression (expr.get ()); + expr->evaluate (); } static void @@ -1900,7 +1900,7 @@ x_command (const char *exp, int from_tty) command's definition. */ if (from_tty) set_repeat_arguments (""); - val = evaluate_expression (expr.get ()); + val = expr->evaluate (); if (TYPE_IS_REFERENCE (val->type ())) val = coerce_ref (val); /* In rvalue contexts, such as this, functions are coerced into @@ -2188,7 +2188,7 @@ do_one_display (struct display *d) struct value *val; CORE_ADDR addr; - val = evaluate_expression (d->exp.get ()); + val = d->exp->evaluate (); addr = value_as_address (val); if (d->format.format == 'i') addr = gdbarch_addr_bits_remove (d->exp->gdbarch, addr); @@ -2226,7 +2226,7 @@ do_one_display (struct display *d) { struct value *val; - val = evaluate_expression (d->exp.get ()); + val = d->exp->evaluate (); print_formatted (val, d->format.size, &opts, gdb_stdout); } catch (const gdb_exception_error &ex) |