aboutsummaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 20:59:39 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:22:17 -0700
commit6bd5c75435099f09bf1b2027e118f66a6fd94218 (patch)
tree077e8f26538eb2bb12dc4d7bdb551ee1ecfcbfb2 /gdb/eval.c
parentfcf86fe5977ec47a0a6e32be9c1434ac808e2c4e (diff)
downloadgdb-6bd5c75435099f09bf1b2027e118f66a6fd94218.zip
gdb-6bd5c75435099f09bf1b2027e118f66a6fd94218.tar.gz
gdb-6bd5c75435099f09bf1b2027e118f66a6fd94218.tar.bz2
Turn some xmethod functions into methods
This turns value_from_xmethod, result_type_of_xmethod, and call_xmethod to be methods of value. value_from_xmethod is a static "constructor" now. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index 808cc91..b263dc9 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -640,7 +640,7 @@ evaluate_subexp_do_call (expression *exp, enum noside noside,
}
else if (ftype->code () == TYPE_CODE_XMETHOD)
{
- type *return_type = result_type_of_xmethod (callee, argvec);
+ type *return_type = callee->result_type_of_xmethod (argvec);
if (return_type == NULL)
error (_("Xmethod is missing return type."));
@@ -678,7 +678,7 @@ evaluate_subexp_do_call (expression *exp, enum noside noside,
return call_internal_function (exp->gdbarch, exp->language_defn,
callee, argvec.size (), argvec.data ());
case TYPE_CODE_XMETHOD:
- return call_xmethod (callee, argvec);
+ return callee->call_xmethod (argvec);
default:
return call_function_by_hand (callee, default_return_type, argvec);
}