diff options
| author | Richard M. Stallman | 1997-07-02 00:37:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-07-02 00:37:26 +0000 |
| commit | 6f4938843687d4ffe878cf8d456b8df33f2809a3 (patch) | |
| tree | ba9c98f18423819f0c1e9cce3821cf56bd9b9456 /src | |
| parent | 523312397aa025eb2b9d011c5a8699ffa857beec (diff) | |
| download | emacs-6f4938843687d4ffe878cf8d456b8df33f2809a3.tar.gz emacs-6f4938843687d4ffe878cf8d456b8df33f2809a3.zip | |
(xcons): Print car and cdr in hex.
(nextcons): New command.
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gdbinit | 11 |
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 | ||
| 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 |