aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/python.texi
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-02-12 08:12:02 -0700
committerTom Tromey <tromey@adacore.com>2024-03-08 10:50:12 -0700
commit99761c5ab53e11105b6067bc4314e74bb066006c (patch)
treede1272d440cd7d8c6680ccf36f5fa9f016706161 /gdb/doc/python.texi
parent03fa0c63d3a5944afcf031ecf0b433b2985e6eeb (diff)
downloadgdb-99761c5ab53e11105b6067bc4314e74bb066006c.zip
gdb-99761c5ab53e11105b6067bc4314e74bb066006c.tar.gz
gdb-99761c5ab53e11105b6067bc4314e74bb066006c.tar.bz2
Export "finish" return value to Python
This patch changes the Python "stop" event emission code to also add the function return value, if it is known. This happens when the stop comes from a "finish" command and when the value can be fetched. The test is in the next patch. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'gdb/doc/python.texi')
-rw-r--r--gdb/doc/python.texi6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 4ae7271..4ca3ae4 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -3813,6 +3813,12 @@ corresponding MI output (@pxref{GDB/MI Async Records}).
A dictionary was used for this (rather than adding attributes directly
to the event object) so that the MI keys could be used unchanged.
+
+When a @code{StopEvent} results from a @code{finish} command, it will
+also hold the return value from the function, if that is available.
+This will be an entry named @samp{return-value} in the @code{details}
+dictionary. The value of this entry will be a @code{gdb.Value}
+object.
@end defvar
Emits @code{gdb.SignalEvent}, which extends @code{gdb.StopEvent}.