mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
Implement gdb.execute_mi
This adds a new Python function, gdb.execute_mi, that can be used to invoke an MI command but get the output as a Python object, rather than a string. This is done by implementing a new ui_out subclass that builds a Python object. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=11688 Reviewed-By: Eli Zaretskii <eliz@gnu.org>
This commit is contained in:
@@ -483,6 +483,9 @@ struct symtab_and_line *sal_object_to_symtab_and_line (PyObject *obj);
|
||||
frame_info_ptr frame_object_to_frame_info (PyObject *frame_obj);
|
||||
struct gdbarch *arch_object_to_gdbarch (PyObject *obj);
|
||||
|
||||
extern PyObject *gdbpy_execute_mi_command (PyObject *self, PyObject *args,
|
||||
PyObject *kw);
|
||||
|
||||
/* Convert Python object OBJ to a program_space pointer. OBJ must be a
|
||||
gdb.Progspace reference. Return nullptr if the gdb.Progspace is not
|
||||
valid (see gdb.Progspace.is_valid), otherwise return the program_space
|
||||
|
||||
Reference in New Issue
Block a user