diff options
author | Tom Tromey <tom@tromey.com> | 2020-12-15 18:35:13 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-12-15 18:57:07 -0700 |
commit | efd7ff149a42c865cac422e3bafdf386c91c5373 (patch) | |
tree | 1ad19dfafeaca30bc40c43adf55e826327ead802 /gdb/objc-lang.c | |
parent | 2adab65cc07f07a581d57b05dfbc100952fab748 (diff) | |
download | gdb-efd7ff149a42c865cac422e3bafdf386c91c5373.zip gdb-efd7ff149a42c865cac422e3bafdf386c91c5373.tar.gz gdb-efd7ff149a42c865cac422e3bafdf386c91c5373.tar.bz2 |
Add expected type parameter to evaluate_expression
While working on the expression rewrite, I found a few spots that
called the internal functions of the expression evaluator, just to
pass in an expected type. This patch adds a parameter to
evaluate_expression so that these functions can avoid this dependency.
Regression tested on x86-64 Fedora 28.
gdb/ChangeLog
2020-12-15 Tom Tromey <tom@tromey.com>
* stap-probe.c (stap_probe::evaluate_argument): Use
evaluate_expression.
* dtrace-probe.c (dtrace_probe::evaluate_argument): Use
evaluate_expression.
* value.h (evaluate_expression): Add expect_type parameter.
* objc-lang.c (print_object_command): Call evaluate_expression.
* eval.c (evaluate_expression): Add expect_type parameter.
Diffstat (limited to 'gdb/objc-lang.c')
-rw-r--r-- | gdb/objc-lang.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 4cd8532..10220c8 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -1194,10 +1194,10 @@ print_object_command (const char *args, int from_tty) { expression_up expr = parse_expression (args); - int pc = 0; - object = evaluate_subexp (builtin_type (expr->gdbarch)->builtin_data_ptr, - expr.get (), &pc, EVAL_NORMAL); + object + = evaluate_expression (expr.get (), + builtin_type (expr->gdbarch)->builtin_data_ptr); } /* Validate the address for sanity. */ |