aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-08-16 16:48:01 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-08-24 14:44:20 +0100
commit70175292616118bad315296ba6180f375326bb6c (patch)
treed8d27502ccae432ab24e068dc659f864546e7089 /gdb/doc
parent42bd5254fb5f52f045796e1d9cce07102881d3b1 (diff)
downloadgdb-70175292616118bad315296ba6180f375326bb6c.zip
gdb-70175292616118bad315296ba6180f375326bb6c.tar.gz
gdb-70175292616118bad315296ba6180f375326bb6c.tar.bz2
gdb: new 'maint print frame-id' command
When debugging a certain class of GDB bug, I often end up wanting to know what GDB thinks the frame-id is in a particular frame. It's not too hard to pull this from some debug output, but I thought it might be nice if there was a maintenance command that could tell us. This commit adds 'maint print frame-id' which prints the frame-id of the currently selected frame. You can also pass a frame level number to find the frame-id for a specific frame. There's a new test too.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/gdb.texinfo17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 82cb1c8..33a56e0 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -40142,6 +40142,23 @@ The program being debugged stopped while in a function called from GDB.
Takes an optional file parameter.
+@kindex maint print frame-id
+@item maint print frame-id
+@itemx maint print frame-id @var{level}
+Print @value{GDBN}'s internal frame-id for the frame at relative
+@var{level}, or for the currently selected frame when @var{level} is
+not given.
+
+If used, @var{level} should be an integer, as displayed in the
+@command{backtrace} output.
+
+@smallexample
+(@value{GDBP}) maint print frame-id
+frame-id for frame #0: @{stack=0x7fffffffac70,code=0x0000000000401106,!special@}
+(@value{GDBP}) maint print frame-id 2
+frame-id for frame #2: @{stack=0x7fffffffac90,code=0x000000000040111c,!special@}
+@end smallexample
+
@kindex maint print registers
@kindex maint print raw-registers
@kindex maint print cooked-registers