aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-06-20 11:30:04 -0600
committerTom Tromey <tromey@adacore.com>2022-07-18 11:25:34 -0600
commit0b4fe76f956293778f109764911a0b14dc944f5d (patch)
treea49d8074a33c86ea64a1f797ab3ecb99ad0597c4 /gdb/doc
parent23948f56021f46bb2bdee7afad074aafe8329230 (diff)
downloadfsf-binutils-gdb-0b4fe76f956293778f109764911a0b14dc944f5d.zip
fsf-binutils-gdb-0b4fe76f956293778f109764911a0b14dc944f5d.tar.gz
fsf-binutils-gdb-0b4fe76f956293778f109764911a0b14dc944f5d.tar.bz2
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.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/python.texi11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 5dd907f..eeb847a 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -3494,6 +3494,17 @@ A reference to the object file (@code{gdb.Objfile}) which has been loaded.
@xref{Objfiles In Python}, for details of the @code{gdb.Objfile} object.
@end defvar
+@item events.free_objfile
+Emits @code{gdb.FreeObjFileEvent} which indicates that an object file
+is about to be removed from @value{GDBN}. One reason this can happen
+is when the inferior calls @code{dlclose}.
+@code{gdb.FreeObjFileEvent} has one attribute:
+
+@defvar NewObjFileEvent.objfile
+A reference to the object file (@code{gdb.Objfile}) which will be unloaded.
+@xref{Objfiles In Python}, for details of the @code{gdb.Objfile} object.
+@end defvar
+
@item events.clear_objfiles
Emits @code{gdb.ClearObjFilesEvent} which indicates that the list of object
files for a program space has been reset.