aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-02 00:37:26 +0000
committerRichard M. Stallman1997-07-02 00:37:26 +0000
commit6f4938843687d4ffe878cf8d456b8df33f2809a3 (patch)
treeba9c98f18423819f0c1e9cce3821cf56bd9b9456 /src
parent523312397aa025eb2b9d011c5a8699ffa857beec (diff)
downloademacs-6f4938843687d4ffe878cf8d456b8df33f2809a3.tar.gz
emacs-6f4938843687d4ffe878cf8d456b8df33f2809a3.zip
(xcons): Print car and cdr in hex.
(nextcons): New command.
Diffstat (limited to 'src')
-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
200 200
201define xcons 201define xcons
202print (struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits) 202print (struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits)
203output *$ 203output/x *$
204echo \n 204echo \n
205end 205end
206document xcons 206document xcons
207Print the contents of $, assuming it is an Emacs Lisp cons. 207Print the contents of $, assuming it is an Emacs Lisp cons.
208end 208end
209 209
210define nextcons
211p $.cdr
212xcons
213end
214document nextcons
215Print the contents of the next cell in a list.
216This assumes that the last thing you printed was a cons cell contents
217(type struct Lisp_Cons) or a pointer to one.
218end
210define xcar 219define xcar
211print ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->car : 0) 220print ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->car : 0)
212end 221end