mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 14:39:09 +08:00
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.
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user