summaryrefslogtreecommitdiff
path: root/src/.gdbinit
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-07-02 00:37:26 +0000
committerRichard M. Stallman <rms@gnu.org>1997-07-02 00:37:26 +0000
commit251c39cbdea3ff58e3c50cc472d69005b461848c (patch)
treed68286920d50719146e68b37ef173162db9e88b8 /src/.gdbinit
parent018ab5f35242c021cf77d84fde575e68c5596bc1 (diff)
downloademacs-251c39cbdea3ff58e3c50cc472d69005b461848c.tar.gz
(xcons): Print car and cdr in hex.
(nextcons): New command.
Diffstat (limited to 'src/.gdbinit')
-rw-r--r--src/.gdbinit11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index ab47f0844ac..1c9c57134e8 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -200,13 +200,22 @@ end
define xcons
print (struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits)
-output *$
+output/x *$
echo \n
end
document xcons
Print the contents of $, assuming it is an Emacs Lisp cons.
end
+define nextcons
+p $.cdr
+xcons
+end
+document nextcons
+Print the contents of the next cell in a list.
+This assumes that the last thing you printed was a cons cell contents
+(type struct Lisp_Cons) or a pointer to one.
+end
define xcar
print ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->car : 0)
end