Implement gdb.execute_mi
authorTom Tromey <tromey@adacore.com>
Thu, 16 Mar 2023 16:57:32 +0000 (10:57 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 23 May 2023 16:09:28 +0000 (10:09 -0600)
commitc97d123d6701fbf462e96db001cea07ed32e4efa
tree7442dc14459bc1e8874998d219dda702371f380e
parente7a2797eb00dbbceb6796f1baa120055d174a229
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>
gdb/Makefile.in
gdb/NEWS
gdb/doc/python.texi
gdb/mi/mi-cmds.h
gdb/mi/mi-main.c
gdb/python/py-mi.c [new file with mode: 0644]
gdb/python/python-internal.h
gdb/python/python.c
gdb/testsuite/gdb.python/py-exec-mi.exp [new file with mode: 0644]
gdb/testsuite/gdb.python/py-mi-cmd.py