Add gdb.free_objfile event registry
authorTom Tromey <tromey@adacore.com>
Mon, 20 Jun 2022 17:30:04 +0000 (11:30 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 18 Jul 2022 17:25:34 +0000 (11:25 -0600)
commit0b4fe76f956293778f109764911a0b14dc944f5d
treea49d8074a33c86ea64a1f797ab3ecb99ad0597c4
parent23948f56021f46bb2bdee7afad074aafe8329230
Add gdb.free_objfile event registry

Currently, Python code can use event registries to detect when gdb
loads a new objfile, and when gdb clears the objfile list.  However,
there's no way to detect the removal of an objfile, say when the
inferior calls dlclose.

This patch adds a gdb.free_objfile event registry and arranges for an
event to be emitted in this case.
gdb/doc/python.texi
gdb/python/py-all-events.def
gdb/python/py-event-types.def
gdb/python/py-event.h
gdb/python/py-inferior.c
gdb/python/py-newobjfileevent.c
gdb/testsuite/gdb.python/py-event-load.c [new file with mode: 0644]
gdb/testsuite/gdb.python/py-event-load.exp [new file with mode: 0644]
gdb/testsuite/gdb.python/py-event-load.py [new file with mode: 0644]