diff options
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/extension.h | 7 | ||||
-rw-r--r-- | gdb/python/py-xmethods.c | 17 | ||||
-rw-r--r-- | gdb/valops.c | 2 |
4 files changed, 10 insertions, 25 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 65b9ef9..ff45306 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,14 @@ 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca> + * extension.h (struct xmethod_worker) <clone>: Remove. + * python/py-xmethods.c (struct python_xmethod_worker) <clone>: + Remove. + (python_xmethod_worker::clone): Remove. + * valops.c (find_overload_match): Use std::move instead of + clone. + +2018-01-07 Simon Marchi <simon.marchi@polymtl.ca> + * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h. (struct extension_language_ops) <clone_xmethod_worker_data>: Remove. <free_xmethod_worker_data>: Remove. diff --git a/gdb/extension.h b/gdb/extension.h index 475d712..effa5bb 100644 --- a/gdb/extension.h +++ b/gdb/extension.h @@ -182,13 +182,6 @@ struct xmethod_worker virtual value *invoke (value *obj, value **args, int nargs) = 0; - /* Clone this worker, returns a new but identical worker. - The function get_matching_xmethod_workers returns a vector of matching - workers. If a particular worker is selected by GDB to invoke a method, - then this function can help in cloning the selected worker. */ - - virtual std::unique_ptr<xmethod_worker> clone () = 0; - /* Return the arg types of the xmethod encapsulated in this worker. An array of arg types is returned. The length of the array is returned in NARGS. The type of the 'this' object is returned as the first element of diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c index f4064c2..f7e3c37 100644 --- a/gdb/python/py-xmethods.c +++ b/gdb/python/py-xmethods.c @@ -48,10 +48,6 @@ struct python_xmethod_worker : xmethod_worker value *invoke (value *obj, value **args, int nargs) override; - /* Implementation of xmethod_worker::clone for Python. */ - - xmethod_worker_up clone () override; - /* Implementation of xmethod_worker::do_get_arg_types for Python. */ ext_lang_rc do_get_arg_types (int *nargs, type ***arg_types) override; @@ -80,19 +76,6 @@ python_xmethod_worker::~python_xmethod_worker () Py_DECREF (m_this_type); } -/* See declaration. */ - -xmethod_worker_up -python_xmethod_worker::clone () -{ - /* We don't do much here, but we still need the GIL. */ - gdbpy_enter enter_py (get_current_arch (), current_language); - - xmethod_worker *worker = new python_xmethod_worker (m_py_worker, m_this_type); - - return xmethod_worker_up (worker); -} - /* Invoke the "match" method of the MATCHER and return a new reference to the result. Returns NULL on error. */ diff --git a/gdb/valops.c b/gdb/valops.c index 8fccfe9..e038c04 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -2778,7 +2778,7 @@ find_overload_match (struct value **args, int nargs, } else *valp = value_from_xmethod - (xm_worker_vec[ext_method_oload_champ]->clone ()); + (std::move (xm_worker_vec[ext_method_oload_champ])); } else *symp = oload_syms[func_oload_champ]; |