From 24b4d1bc2951393aa7eb9b0befb76af859ba5068 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 11 Jan 2000 22:07:09 +0000 Subject: [PATCH] Adapt to new strings. --- src/.gdbinit | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/.gdbinit b/src/.gdbinit index 406e02def59..52e902809f6 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -134,7 +134,7 @@ end 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 @@ document xscrollbar 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 -- 2.39.5