aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2005-01-21 00:30:56 +0000
committerRichard M. Stallman2005-01-21 00:30:56 +0000
commit0e73312bedf881fd3c7b6aa9306eacd1a3b966d3 (patch)
tree8bf90fb01871ef4fe989eb65707690e5e1e50ed9 /src
parent2cf2fc27c89fdfc244416eebcdc30ca7c1234561 (diff)
downloademacs-0e73312bedf881fd3c7b6aa9306eacd1a3b966d3.tar.gz
emacs-0e73312bedf881fd3c7b6aa9306eacd1a3b966d3.zip
(xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit15
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.
36handle SIGALRM ignore 36handle 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.
42define xgetptr 42define 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
44end 45end
45 46
46define xgetint 47define 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
48end 50end
49 51
50define xgettype 52define 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)
52end 55end
53 56
54# Set up something to print out s-expressions. 57# Set up something to print out s-expressions.