diff options
| author | Richard M. Stallman | 2005-01-21 00:30:56 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-01-21 00:30:56 +0000 |
| commit | 0e73312bedf881fd3c7b6aa9306eacd1a3b966d3 (patch) | |
| tree | 8bf90fb01871ef4fe989eb65707690e5e1e50ed9 /src | |
| parent | 2cf2fc27c89fdfc244416eebcdc30ca7c1234561 (diff) | |
| download | emacs-0e73312bedf881fd3c7b6aa9306eacd1a3b966d3.tar.gz emacs-0e73312bedf881fd3c7b6aa9306eacd1a3b966d3.zip | |
(xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gdbinit | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 6adb9f3fa02..440fa858244 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -35,20 +35,23 @@ handle 2 noprint pass | |||
| 35 | # debugging. | 35 | # debugging. |
| 36 | handle SIGALRM ignore | 36 | handle SIGALRM ignore |
| 37 | 37 | ||
| 38 | # Set up a mask to use. | 38 | # $valmask and $tagmask are mask values set up by the xreload macro below. |
| 39 | # This should be EMACS_INT, but in some cases that is a macro. | ||
| 40 | # long ought to work in all cases right now. | ||
| 41 | 39 | ||
| 40 | # Use $bugfix so that the value isn't a constant. | ||
| 41 | # Using a constant runs into GDB bugs sometimes. | ||
| 42 | define xgetptr | 42 | define xgetptr |
| 43 | set $ptr = (gdb_use_union ? $arg0.u.val : $arg0 & $valmask) | gdb_data_seg_bits | 43 | set $bugfix = $arg0 |
| 44 | set $ptr = (gdb_use_union ? $bugfix.u.val : $bugfix & $valmask) | gdb_data_seg_bits | ||
| 44 | end | 45 | end |
| 45 | 46 | ||
| 46 | define xgetint | 47 | define xgetint |
| 47 | set $int = gdb_use_union ? $arg0.s.val : (gdb_use_lsb ? $arg0 : $arg0 << gdb_gctypebits) >> gdb_gctypebits | 48 | set $bugfix = $arg0 |
| 49 | set $int = gdb_use_union ? $bugfix.s.val : (gdb_use_lsb ? $bugfix : $bugfix << gdb_gctypebits) >> gdb_gctypebits | ||
| 48 | end | 50 | end |
| 49 | 51 | ||
| 50 | define xgettype | 52 | define xgettype |
| 51 | set $type = gdb_use_union ? $arg0.s.type : (enum Lisp_Type) (gdb_use_lsb ? $arg0 & $tagmask : $arg0 >> gdb_valbits) | 53 | set $bugfix = $arg0 |
| 54 | set $type = gdb_use_union ? $bugfix.s.type : (enum Lisp_Type) (gdb_use_lsb ? $bugfix & $tagmask : $bugfix >> gdb_valbits) | ||
| 52 | end | 55 | end |
| 53 | 56 | ||
| 54 | # Set up something to print out s-expressions. | 57 | # Set up something to print out s-expressions. |