mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-25 03:06:11 +08:00
gdb/python: new function to add values into GDB's history
The guile API has (history-append! <value>) to add values into GDB's history list. There is currently no equivalent in the Python API. This commit adds gdb.add_history(<value>) to the Python API, this function takes <value> 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.
This commit is contained in:
@ -2076,6 +2076,8 @@ PyMethodDef python_GdbMethods[] =
|
||||
{
|
||||
{ "history", gdbpy_history, METH_VARARGS,
|
||||
"Get a value from history" },
|
||||
{ "add_history", gdbpy_add_history, METH_VARARGS,
|
||||
"Add a value to the value history list" },
|
||||
{ "execute", (PyCFunction) execute_gdb_command, METH_VARARGS | METH_KEYWORDS,
|
||||
"execute (command [, from_tty] [, to_string]) -> [String]\n\
|
||||
Evaluate command, a string, as a gdb CLI command. Optionally returns\n\
|
||||
|
Reference in New Issue
Block a user