[PATCH v5 0/2] Make sure autoload happens before notifying Python side in new_objfile event
Simon Marchi
simon.marchi@polymtl.ca
Mon Apr 26 14:53:38 GMT 2021
This is a new version of Michael Weghorn's patchset here:
https://sourceware.org/pipermail/gdb-patches/2021-April/178069.html
I rebased it after merging my "set debug observer" changes.
In addition to just rebasing, I made many style fixes here and there. I
also did some changes in the test to use some more recent GDB testsuite
idioms (that you would miss if you copied an older test, and that I
wouldn't expect a new-ish contributor to know).
I also changed the test to make it work for the native-gdbserver board.
Previously, the test checked the output of the "run" command. This
doesn't work for native-gdbserver, because GDB is connected using the
"remote" protocol, which doesn't support running. Instead, I made the
new_objfile handler set a global variable if everything looks good. We
then check the global variable value in the test.
Michael, can you please take a look and check it is still ok with you?
Michael Weghorn (2):
gdbsupport: allow to specify dependencies between observers
gdb: do autoload before notifying Python side in new_objfile event
gdb/auto-load.c | 9 +-
gdb/auto-load.h | 8 ++
gdb/python/py-inferior.c | 7 +-
...tty-printers-in-newobjfile-event.so-gdb.py | 43 +++++++
...pretty-printers-in-newobjfile-event-lib.cc | 28 +++++
...-pretty-printers-in-newobjfile-event-lib.h | 31 +++++
...retty-printers-in-newobjfile-event-main.cc | 27 +++++
...ed-pretty-printers-in-newobjfile-event.exp | 85 +++++++++++++
...ded-pretty-printers-in-newobjfile-event.py | 50 ++++++++
gdb/unittests/observable-selftests.c | 112 ++++++++++++++++++
gdbsupport/observable.h | 111 ++++++++++++++---
11 files changed, 492 insertions(+), 19 deletions(-)
create mode 100644 gdb/testsuite/gdb.python/libpy-autoloaded-pretty-printers-in-newobjfile-event.so-gdb.py
create mode 100644 gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event-lib.cc
create mode 100644 gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event-lib.h
create mode 100644 gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event-main.cc
create mode 100644 gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
create mode 100644 gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.py
--
2.30.1
More information about the Gdb-patches
mailing list