Undo previous change.
[bpt/emacs.git] / src / .gdbinit
index 8546711..ab47f08 100644 (file)
@@ -1,12 +1,19 @@
 # Set up a mask to use.
 
-set $valmask = ((EMACS_INT)1 << gdb_valbits) - 1
+# Force loading of symbols, enough to give us gdb_valbits etc.
+set main
+
+# Find lwlib source files too.
+dir ../lwlib
+
+# This should be EMACS_INT, but in some cases that is a macro.
+# long ought to work in all cases right now.
+set $valmask = ((long)1 << gdb_valbits) - 1
 set $nonvalbits = gdb_emacs_intbits - gdb_valbits
 
 # Set up something to print out s-expressions.
 define pr
 set debug_print ($)
-echo \n
 end
 document pr
 Print the emacs s-expression which is $.
@@ -141,7 +148,7 @@ end
 
 define xsymbol
 print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits)
-output &$->name->data
+output (char*)&$->name->data
 echo \n
 end
 document xsymbol