diff src/.gdbinit @ 18522:c572c073c982

(xcons): Print car and cdr in hex. (nextcons): New command.
author Richard M. Stallman <rms@gnu.org>
date Wed, 02 Jul 1997 00:37:26 +0000
parents fb218a8bd186
children 8b32c6fe8728
line wrap: on
line diff
--- a/src/.gdbinit	Wed Jul 02 00:06:55 1997 +0000
+++ b/src/.gdbinit	Wed Jul 02 00:37:26 1997 +0000
@@ -200,13 +200,22 @@
 
 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