diff options
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r-- | gdb/python/python.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 3110328..288c701 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -57,6 +57,8 @@ PyObject *gdbpy_children_cst; PyObject *gdbpy_display_hint_cst; PyObject *gdbpy_doc_cst; +/* The GdbError exception. */ +PyObject *gdbpy_gdberror_exc; /* Architecture and language to be used in callbacks from the Python interpreter. */ @@ -655,6 +657,9 @@ Enables or disables printing of Python stack traces."), PyModule_AddStringConstant (gdb_module, "HOST_CONFIG", (char*) host_name); PyModule_AddStringConstant (gdb_module, "TARGET_CONFIG", (char*) target_name); + gdbpy_gdberror_exc = PyErr_NewException ("gdb.GdbError", NULL, NULL); + PyModule_AddObject (gdb_module, "GdbError", gdbpy_gdberror_exc); + gdbpy_initialize_auto_load (); gdbpy_initialize_values (); gdbpy_initialize_frames (); @@ -771,6 +776,12 @@ Return the name of the current target charset." }, "target_wide_charset () -> string.\n\ Return the name of the current target wide charset." }, + { "string_to_argv", gdbpy_string_to_argv, METH_VARARGS, + "string_to_argv (String) -> Array.\n\ +Parse String and return an argv-like array.\n\ +Arguments are separate by spaces and may be quoted." + }, + { "write", gdbpy_write, METH_VARARGS, "Write a string using gdb's filtered stream." }, { "flush", gdbpy_flush, METH_NOARGS, |