From 6bd5c75435099f09bf1b2027e118f66a6fd94218 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 31 Jan 2023 20:59:39 -0700 Subject: 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 --- gdb/value.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'gdb/value.h') diff --git a/gdb/value.h b/gdb/value.h index 448f012..36e7a89 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -543,6 +543,17 @@ public: WHOLE --- regardless of what kind of lvalue WHOLE is. */ void set_component_location (const struct value *whole); + /* Build a value wrapping and representing WORKER. The value takes + ownership of the xmethod_worker object. */ + static struct value *from_xmethod (xmethod_worker_up &&worker); + + /* Return the type of the result of TYPE_CODE_XMETHOD value METHOD. */ + struct type *result_type_of_xmethod (gdb::array_view argv); + + /* Call the xmethod corresponding to the TYPE_CODE_XMETHOD value + METHOD. */ + struct value *call_xmethod (gdb::array_view argv); + /* Type of value; either not an lval, or one of the various different possible kinds of lval. */ @@ -1514,17 +1525,6 @@ struct value *call_internal_function (struct gdbarch *gdbarch, const char *value_internal_function_name (struct value *); -/* Build a value wrapping and representing WORKER. The value takes ownership - of the xmethod_worker object. */ - -extern struct value *value_from_xmethod (xmethod_worker_up &&worker); - -extern struct type *result_type_of_xmethod (struct value *method, - gdb::array_view argv); - -extern struct value *call_xmethod (struct value *method, - gdb::array_view argv); - /* Destroy the values currently allocated. This is called when GDB is exiting (e.g., on quit_force). */ extern void finalize_values (); -- cgit v1.1