binutils-gdb/gdb/python
Jan Vrany 80a3485f81 gdb/python: generalize serialize_mi_result()
This commit generalizes serialize_mi_result() to make usable in
different contexts than printing result of custom MI command.

To do so, the check whether passed Python object is a dictionary has been
moved to the caller - at the very least, different uses require different
error messages.  Also it has been renamed to serialize_mi_results() to better
match GDB/MI output syntax (see corresponding section in documentation,
in particular rules 'result-record' and 'async-output'.

Since it is now more generic function, it has been moved to py-mi.c.

This is a preparation for implementing Python support for sending custom
MI async events.

Approved-By: Andrew Burgess <aburgess@redhat.com>
2023-10-10 11:22:56 +01:00
..
lib/gdb Remove some unnecessary qualification from printing.py 2023-09-26 09:51:56 -06:00
py-all-events.def gdb: add Python events for program space addition and removal 2023-10-02 17:06:40 +01:00
py-arch.c gdb: add __repr__() implementation to a few Python types 2023-07-04 12:07:16 +01:00
py-auto-load.c gdb: add program_space parameters to some auto-load functions 2023-10-05 13:20:50 -04:00
py-block.c gdb: add __repr__() implementation to a few Python types 2023-07-04 12:07:16 +01:00
py-bpevent.c
py-breakpoint.c Use gdb::checked_static_cast for watchpoints 2023-09-19 08:14:00 -06:00
py-cmd.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-connection.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-continueevent.c
py-dap.c [gdb/dap] Disable DAP for python <= 3.5 2023-08-02 23:14:58 +02:00
py-disasm.c Fix two Python calls that don't check for errors 2023-07-03 11:35:18 -06:00
py-event-types.def gdb: add Python events for program space addition and removal 2023-10-02 17:06:40 +01:00
py-event.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-event.h gdb: add program_space parameter to emit_clear_objfiles_event 2023-10-05 13:20:50 -04:00
py-events.h
py-evtregistry.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-evts.c
py-exitedevent.c
py-finishbreakpoint.c Remove explanatory comments from includes 2023-09-20 11:45:16 -06:00
py-frame.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-framefilter.c Don't treat references to compound values as "simple". 2023-05-04 08:58:18 -06:00
py-function.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-gdb-readline.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-inferior.c gdb: add all_objfiles_removed observer 2023-10-05 13:20:50 -04:00
py-infevents.c
py-infthread.c [gdb/build] Return gdb::array_view in thread_info_to_thread_handle 2023-08-24 13:40:38 +02:00
py-instruction.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-instruction.h
py-lazy-string.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-linetable.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-membuf.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-mi.c gdb/python: generalize serialize_mi_result() 2023-10-10 11:22:56 +01:00
py-micmd.c gdb/python: generalize serialize_mi_result() 2023-10-10 11:22:56 +01:00
py-newobjfileevent.c gdb: add program_space parameter to emit_clear_objfiles_event 2023-10-05 13:20:50 -04:00
py-objfile.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-param.c [gdb/build] Fix enum param_types odr violation 2023-08-14 18:32:29 +02:00
py-prettyprint.c Introduce gdb.ValuePrinter 2023-09-26 09:29:14 -06:00
py-progspace.c gdb: add Python events for program space addition and removal 2023-10-02 17:06:40 +01:00
py-record-btrace.c python, btrace: Fix some small formatting issues. 2023-05-31 09:27:17 +02:00
py-record-btrace.h
py-record-full.c
py-record-full.h
py-record.c python, btrace: Fix some small formatting issues. 2023-05-31 09:27:17 +02:00
py-record.h
py-ref.h
py-registers.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-signalevent.c
py-stopevent.c
py-stopevent.h
py-symbol.c Remove explanatory comments from includes 2023-09-20 11:45:16 -06:00
py-symtab.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-threadevent.c gdb/Python: Added ThreadExitedEvent 2023-06-19 16:17:21 +02:00
py-tui.c [gdb/tui] Fix assert in ~gdbpy_tui_window_maker 2023-07-26 12:29:28 +02:00
py-type.c Give a language to a type 2023-09-19 13:28:42 -06:00
py-unwind.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
py-utils.c Remove explanatory comments from includes 2023-09-20 11:45:16 -06:00
py-value.c Remove explanatory comments from includes 2023-09-20 11:45:16 -06:00
py-varobj.c gdb: add gdb::make_unique function 2023-08-23 09:50:30 +01:00
py-xmethods.c gdb/python: add mechanism to manage Python initialization functions 2023-05-05 18:24:42 +01:00
python-config.py
python-internal.h gdb/python: generalize serialize_mi_result() 2023-10-10 11:22:56 +01:00
python.c Re-acquire GIL earlier in gdbpy_parse_and_eval 2023-07-28 06:15:30 -06:00
python.h