diff options
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/python.c | 5 | ||||
-rw-r--r-- | gdb/python/python.h | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 1a0562a2275..c16305b900f 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1745,6 +1745,9 @@ do_start_initialization () #endif /* HAVE_PYTHON */ +/* See python.h. */ +cmd_list_element *python_cmd_element = nullptr; + void _initialize_python (void) { @@ -1774,7 +1777,7 @@ This command is only a placeholder.") ); add_com_alias ("pi", "python-interactive", class_obscure, 1); - add_com ("python", class_obscure, python_command, + python_cmd_element = add_com ("python", class_obscure, python_command, #ifdef HAVE_PYTHON _("\ Evaluate a Python command.\n\ diff --git a/gdb/python/python.h b/gdb/python/python.h index de58fd81df8..4b36f838531 100644 --- a/gdb/python/python.h +++ b/gdb/python/python.h @@ -25,4 +25,7 @@ /* This is all that python exports to gdb. */ extern const struct extension_language_defn extension_language_python; +/* Command element for the 'python' command. */ +extern cmd_list_element *python_cmd_element; + #endif /* GDB_PYTHON_H */ |