aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-10-24 08:05:06 -0600
committerTom Tromey <tromey@adacore.com>2023-11-14 08:44:30 -0700
commit4ead09a294adbb718d642874a554e78d931c2830 (patch)
tree7acb616ddb2ae818b081bf4d8a89ac990f4eb107 /gdb/doc
parent19b83d5c9bac1db207dce26859c6ca84135615b0 (diff)
downloadgdb-4ead09a294adbb718d642874a554e78d931c2830.zip
gdb-4ead09a294adbb718d642874a554e78d931c2830.tar.gz
gdb-4ead09a294adbb718d642874a554e78d931c2830.tar.bz2
Add gdb.Frame.static_link method
This adds a new gdb.Frame.static_link method to the gdb Python layer. This can be used to find the static link frame for a given frame. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/python.texi10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index c26949e..c3dfc7a 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -5739,6 +5739,16 @@ Set this frame to be the selected frame. @xref{Stack, ,Examining the
Stack}.
@end defun
+@defun Frame.static_link ()
+In some languages (e.g., Ada, but also a GNU C extension), a nested
+function can access the variables in the outer scope. This is done
+via a ``static link'', which is a reference from the nested frame to
+the appropriate outer frame.
+
+This method returns this frame's static link frame, if one exists. If
+there is no static link, this method returns @code{None}.
+@end defun
+
@defun Frame.level ()
Return an integer, the stack frame level for this frame. @xref{Frames, ,Stack Frames}.
@end defun