Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
18521:47df19cf0eec | 18522:c572c073c982 |
---|---|
198 Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. | 198 Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. |
199 end | 199 end |
200 | 200 |
201 define xcons | 201 define xcons |
202 print (struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits) | 202 print (struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits) |
203 output *$ | 203 output/x *$ |
204 echo \n | 204 echo \n |
205 end | 205 end |
206 document xcons | 206 document xcons |
207 Print the contents of $, assuming it is an Emacs Lisp cons. | 207 Print the contents of $, assuming it is an Emacs Lisp cons. |
208 end | 208 end |
209 | 209 |
210 define nextcons | |
211 p $.cdr | |
212 xcons | |
213 end | |
214 document nextcons | |
215 Print the contents of the next cell in a list. | |
216 This assumes that the last thing you printed was a cons cell contents | |
217 (type struct Lisp_Cons) or a pointer to one. | |
218 end | |
210 define xcar | 219 define xcar |
211 print ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->car : 0) | 220 print ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->car : 0) |
212 end | 221 end |
213 document xcar | 222 document xcar |
214 Print the car of $, assuming it is an Emacs Lisp pair. | 223 Print the car of $, assuming it is an Emacs Lisp pair. |