binutils-gdb/gdb/doc
Andrew Burgess b1f0f28418 gdb/python: add a new gdb_exiting event
Add a new event, gdb.events.gdb_exiting, which is called once GDB
decides it is going to exit.

This event is not triggered in the case that GDB performs a hard
abort, for example, when handling an internal error and the user
decides to quit the debug session, or if GDB hits an unexpected,
fatal, signal.

This event is triggered if the user just types 'quit' at the command
prompt, or if GDB is run with '-batch' and has processed all of the
required commands.

The new event type is gdb.GdbExitingEvent, and it has a single
attribute exit_code, which is the value that GDB is about to exit
with.

The event is triggered before GDB starts dismantling any of its own
internal state, so, my expectation is that most Python calls should
work just fine at this point.

When considering this functionality I wondered about using the
'atexit' Python module.  However, this is triggered when the Python
environment is shut down, which is done from a final cleanup.  At
this point we don't know for sure what other GDB state has already
been cleaned up.
2021-10-05 10:05:40 +01:00
..
.gitignore
a4rc.sed
agentexpr.texi
all-cfg.texi
annotate.texinfo
ChangeLog-1991-2021 gdb: move remaining ChangeLogs to legacy files 2021-07-26 12:20:33 +01:00
doxy-index.in
Doxyfile-base.in
Doxyfile-gdb-api.in
Doxyfile-gdb-xref.in
Doxyfile-gdbserver.in
fdl.texi
filter-for-doxygen
filter-params.pl
gdb.texinfo gdb/doc: use 'standard error stream' instead of 'stderr' in some places 2021-09-29 09:25:03 +01:00
gpl.texi
guile.texi Guile: temporary breakpoints 2021-07-28 20:30:24 -04:00
lpsrc.sed
Makefile.in
psrc.sed
python.texi gdb/python: add a new gdb_exiting event 2021-10-05 10:05:40 +01:00
refcard.tex
stabs.texinfo
stack_frame.eps
stack_frame.pdf
stack_frame.png
stack_frame.svg
stack_frame.txt