changeset 27290:c26a9f95a880

Adapt to new strings.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 11 Jan 2000 22:07:09 +0000
parents f6c878d8527c
children 224be87d0ad0
files src/.gdbinit
diffstat 1 files changed, 33 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/.gdbinit	Tue Jan 11 22:04:24 2000 +0000
+++ b/src/.gdbinit	Tue Jan 11 22:07:09 2000 +0000
@@ -134,7 +134,7 @@
 
 define xsymbol
 print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits)
-output (char*)&$->name->data
+output (char*)$->name->data
 echo \n
 end
 document xsymbol
@@ -291,6 +291,38 @@
 Print $ as a scrollbar pointer.
 end
 
+define xprintsym
+  set $sym = (struct Lisp_Symbol *) ((((int) $arg0) & $valmask) | gdb_data_seg_bits)
+  output (char*)$sym->name->data
+  echo \n
+end
+document xprintsym
+  Print argument as a symbol.
+end
+
+define xbacktrace
+  set $bt = backtrace_list
+  while $bt 
+    xprintsym *$bt->function
+    set $bt = $bt->next
+  end
+end
+document xbacktrace
+  Print a backtrace of Lisp function calls from backtrace_list.
+  Set a breakpoint at Fsignal and call this to see from where 
+  an error was signalled.
+end
+
+define xreload
+  set $valmask = ((long)1 << gdb_valbits) - 1
+  set $nonvalbits = gdb_emacs_intbits - gdb_valbits
+end
+document xreload
+  When starting Emacs a second time in the same gdb session under
+  FreeBSD 2.2.5, gdb 4.13, $valmask and $nonvalbits have lost
+  their values.  This function reloads them.
+end
+
 set print pretty on
 set print sevenbit-strings