From: Michael Weghorn <m.weghorn@posteo.de>
To: gdb-patches@sourceware.org
Cc: Michael Weghorn <m.weghorn@posteo.de>
Subject: [PATCH v4 0/2] Make sure autoload happens before notifying Python side in new_objfile event
Date: Thu, 22 Apr 2021 15:44:09 +0000 [thread overview]
Message-ID: <20210422154411.2788874-1-m.weghorn@posteo.de> (raw)
In-Reply-To: <20210210154053.82927-1-m.weghorn@posteo.de>
This adds the possibility to explicitly specify dependencies between
observers and makes use of this to make accessing an
objfile's Python pretty printers (defined in an autoloaded script)
from a handler for the Python-side 'new_objfile' works.
This is based on top of commit f7716715f1d2a71a5c95b7ac0e0323b742692e6d
from Simon Marchi's WIP branch with some improvements to observable.h:
https://github.com/simark/binutils-gdb/tree/observer-dep
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 | 7 +-
gdb/auto-load.h | 8 ++
gdb/python/py-inferior.c | 7 +-
...tty-printers-in-newobjfile-event.so-gdb.py | 44 ++++++++
...pretty-printers-in-newobjfile-event-lib.cc | 26 +++++
...-pretty-printers-in-newobjfile-event-lib.h | 31 ++++++
...retty-printers-in-newobjfile-event-main.cc | 23 ++++
...ed-pretty-printers-in-newobjfile-event.exp | 96 +++++++++++++++++
...ded-pretty-printers-in-newobjfile-event.py | 34 ++++++
gdb/unittests/observable-selftests.c | 102 ++++++++++++++++++
gdbsupport/observable.h | 96 ++++++++++++++---
11 files changed, 457 insertions(+), 17 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.2
next prev parent reply other threads:[~2021-04-22 15:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 15:40 [PATCH] gdb: Change init order so pretty printers are set " Michael Weghorn
2021-02-11 9:42 ` Andrew Burgess
2021-02-11 11:23 ` Michael Weghorn
2021-03-02 7:18 ` Michael Weghorn
2021-03-23 18:55 ` Simon Marchi
2021-03-24 9:45 ` Andrew Burgess
2021-03-24 13:51 ` Simon Marchi
2021-03-26 8:33 ` Michael Weghorn
2021-02-11 11:22 ` [PATCH v2] " Michael Weghorn
2021-03-23 8:01 ` [PING] " Michael Weghorn
2021-03-26 8:29 ` [PATCH v3] gdb: Do autoload before notifying Python side " Michael Weghorn
2021-04-12 13:37 ` [PING] " Michael Weghorn
2021-04-20 11:38 ` [PING 2] " Michael Weghorn
2021-04-20 21:57 ` Simon Marchi
2021-04-22 15:46 ` Michael Weghorn
2021-04-22 16:06 ` Simon Marchi
2021-04-23 6:41 ` Michael Weghorn
2021-04-23 10:48 ` Simon Marchi
2021-04-22 15:44 ` Michael Weghorn [this message]
2021-04-22 15:44 ` [PATCH v4 1/2] gdbsupport: Allow to specify dependencies between observers Michael Weghorn
2021-04-22 15:44 ` [PATCH v4 2/2] gdb: Do autoload before notifying Python side in new_objfile event Michael Weghorn
2021-04-25 1:46 ` [PATCH v4 0/2] Make sure autoload happens " Simon Marchi
2021-04-26 8:18 ` Michael Weghorn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210422154411.2788874-1-m.weghorn@posteo.de \
--to=m.weghorn@posteo.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).