From 0b4fe76f956293778f109764911a0b14dc944f5d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 20 Jun 2022 11:30:04 -0600 Subject: 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/python/py-event.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/python/py-event.h') diff --git a/gdb/python/py-event.h b/gdb/python/py-event.h index 831dd10..220af1f 100644 --- a/gdb/python/py-event.h +++ b/gdb/python/py-event.h @@ -74,6 +74,7 @@ extern gdbpy_ref<> create_thread_event_object (PyTypeObject *py_type, PyObject *thread); extern int emit_new_objfile_event (struct objfile *objfile); +extern int emit_free_objfile_event (struct objfile *objfile); extern int emit_clear_objfiles_event (void); extern void evpy_dealloc (PyObject *self); -- cgit v1.1