public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/9] Add executable_changed event to Python API
@ 2023-09-16 10:18 Andrew Burgess
  2023-09-16 10:18 ` [PATCH 1/9] gdb/doc: extend the description for Progspace.filename Andrew Burgess
                   ` (9 more replies)
  0 siblings, 10 replies; 25+ messages in thread
From: Andrew Burgess @ 2023-09-16 10:18 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

When I started, I thought this would be trivial; I wanted to expose
the executable_changed observer through the Python API.

Well, it turns out that the executable filename isn't directly visible
from the Python API, so having an event for when it changes doesn't
make a great deal of sense.  So the first 3 patches sort that out.

Then, once I started looking at how the executable_changed observer is
used, it feels like it is currently overloaded a little, and, as a
result, triggers more than it needs to.  The next 3 patches try to
sort this out.

Then patch 7 adds some additional arguments to the executable changed
observer.

Patch 8 is the trivial patch that exposes the observer as an event in
the Python API.

.... And patch 9 fixes a final bug/annoyance which I ran into while
writing the tests for patch 8.

---

Andrew Burgess (9):
  gdb/doc: extend the description for Progspace.filename
  gdb/python: new Progspace.symbol_file attribute
  gdb/python: new Progspace.executable_filename attribute
  gdb: remove one user of the executable changed observer
  gdb: remove final user of the executable_changed observer
  gdb: remove unnecessary notification of executable_changed observer
  gdb: pass more arguments to the executable_changed observer
  gdb/python: make the executable_changed event available from Python
  gdb: use reopen_exec_file from reread_symbols

 gdb/NEWS                                  |  16 ++
 gdb/auxv.c                                |  10 +-
 gdb/doc/python.texi                       |  71 +++++++-
 gdb/exec.c                                |  11 +-
 gdb/observable.h                          |  18 +-
 gdb/python/py-all-events.def              |   1 +
 gdb/python/py-event-types.def             |   5 +
 gdb/python/py-progspace.c                 | 100 ++++++++++-
 gdb/symfile.c                             |  22 +--
 gdb/symtab.c                              |  18 +-
 gdb/testsuite/gdb.python/py-exec-file.c   |  22 +++
 gdb/testsuite/gdb.python/py-exec-file.exp | 195 ++++++++++++++++++++++
 gdb/testsuite/gdb.python/py-progspace.exp |   9 +
 13 files changed, 458 insertions(+), 40 deletions(-)
 create mode 100644 gdb/testsuite/gdb.python/py-exec-file.c
 create mode 100644 gdb/testsuite/gdb.python/py-exec-file.exp


base-commit: 5a6dafd5f1110e8b642fdf65c13d8543e469a09e
-- 
2.25.4


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2023-10-02 16:19 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-16 10:18 [PATCH 0/9] Add executable_changed event to Python API Andrew Burgess
2023-09-16 10:18 ` [PATCH 1/9] gdb/doc: extend the description for Progspace.filename Andrew Burgess
2023-09-16 10:53   ` Eli Zaretskii
2023-09-16 10:18 ` [PATCH 2/9] gdb/python: new Progspace.symbol_file attribute Andrew Burgess
2023-09-16 10:56   ` Eli Zaretskii
2023-09-16 10:18 ` [PATCH 3/9] gdb/python: new Progspace.executable_filename attribute Andrew Burgess
2023-09-16 10:55   ` Eli Zaretskii
2023-09-16 10:18 ` [PATCH 4/9] gdb: remove one user of the executable changed observer Andrew Burgess
2023-09-16 10:18 ` [PATCH 5/9] gdb: remove final user of the executable_changed observer Andrew Burgess
2023-09-16 10:18 ` [PATCH 6/9] gdb: remove unnecessary notification of " Andrew Burgess
2023-09-16 10:18 ` [PATCH 7/9] gdb: pass more arguments to the " Andrew Burgess
2023-09-16 10:18 ` [PATCH 8/9] gdb/python: make the executable_changed event available from Python Andrew Burgess
2023-09-16 11:03   ` Eli Zaretskii
2023-09-28 14:35     ` Andrew Burgess
2023-09-16 10:18 ` [PATCH 9/9] gdb: use reopen_exec_file from reread_symbols Andrew Burgess
2023-09-19 14:08   ` Tom Tromey
2023-09-28 15:23     ` Andrew Burgess
2023-09-28 18:15       ` Tom Tromey
2023-09-29 10:17         ` Andrew Burgess
2023-09-29 15:18           ` Eli Zaretskii
2023-10-02 14:16           ` Tom Tromey
2023-09-29 14:42         ` Eli Zaretskii
2023-10-02 14:02           ` Tom Tromey
2023-10-02 16:19             ` Eli Zaretskii
2023-09-19 14:09 ` [PATCH 0/9] Add executable_changed event to Python API Tom Tromey

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).