comparison src/.gdbinit @ 18835:8b32c6fe8728

(xcar, xcdr): Print with /x.
author Richard M. Stallman <rms@gnu.org>
date Thu, 17 Jul 1997 18:32:27 +0000
parents c572c073c982
children 3b630b1cb848
comparison
equal deleted inserted replaced
18834:a4b74a7b692a 18835:8b32c6fe8728
215 Print the contents of the next cell in a list. 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 216 This assumes that the last thing you printed was a cons cell contents
217 (type struct Lisp_Cons) or a pointer to one. 217 (type struct Lisp_Cons) or a pointer to one.
218 end 218 end
219 define xcar 219 define xcar
220 print ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->car : 0) 220 print/x ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->car : 0)
221 end 221 end
222 document xcar 222 document xcar
223 Print the car of $, assuming it is an Emacs Lisp pair. 223 Print the car of $, assuming it is an Emacs Lisp pair.
224 end 224 end
225 225
226 define xcdr 226 define xcdr
227 print ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->cdr : 0) 227 print/x ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->cdr : 0)
228 end 228 end
229 document xcdr 229 document xcdr
230 Print the cdr of $, assuming it is an Emacs Lisp pair. 230 Print the cdr of $, assuming it is an Emacs Lisp pair.
231 end 231 end
232 232