comparison src/.gdbinit @ 59660:5ee7eaad2958

(xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
author Richard M. Stallman <rms@gnu.org>
date Fri, 21 Jan 2005 00:30:56 +0000
parents d1917e4b98e7
children 28b65d07edde 3dcba0bc766b 6d92d69fae33
comparison
equal deleted inserted replaced
59659:030542bf12bf 59660:5ee7eaad2958
33 33
34 # Don't pass SIGALRM to Emacs. This makes problems when 34 # Don't pass SIGALRM to Emacs. This makes problems when
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. 39
40 # long ought to work in all cases right now. 40 # Use $bugfix so that the value isn't a constant.
41 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.
55 define pr 58 define pr
56 set debug_print ($) 59 set debug_print ($)