From 540bf37b2539923dc70b96eea7cb870522ffd7ec Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Fri, 30 Jul 2021 12:56:34 +0100 Subject: gdb/python: new function to add values into GDB's history The guile API has (history-append! ) to add values into GDB's history list. There is currently no equivalent in the Python API. This commit adds gdb.add_history() to the Python API, this function takes a gdb.Value (or anything that can be passed to the constructor of gdb.Value), and adds the value it represents to GDB's history list. The index of the newly added value is returned. --- gdb/python/python-internal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/python/python-internal.h') diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index 690d2fb..0e140f1 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -412,6 +412,7 @@ extern enum ext_lang_rc gdbpy_get_matching_xmethod_workers PyObject *gdbpy_history (PyObject *self, PyObject *args); +PyObject *gdbpy_add_history (PyObject *self, PyObject *args); PyObject *gdbpy_convenience_variable (PyObject *self, PyObject *args); PyObject *gdbpy_set_convenience_variable (PyObject *self, PyObject *args); PyObject *gdbpy_breakpoints (PyObject *, PyObject *); -- cgit v1.1