# HG changeset patch # User Gerd Moellmann # Date 972384957 0 # Node ID c49b460bb2803e6d2b5c26f127a2d3a704c25b17 # Parent 4ae3a43dad2de6c871dd382bea6325fd0f647dfa (xbacktrace): Handle case that $bt->function isn't a symbol. diff -r 4ae3a43dad2d -r c49b460bb280 src/.gdbinit --- a/src/.gdbinit Tue Oct 24 10:52:22 2000 +0000 +++ b/src/.gdbinit Tue Oct 24 10:55:57 2000 +0000 @@ -315,14 +315,26 @@ define xbacktrace set $bt = backtrace_list while $bt - xprintsym *$bt->function + set $type = (enum Lisp_Type) ((*$bt->function >> gdb_valbits) & 0x7) + if $type == Lisp_Symbol + xprintsym *$bt->function + else + printf "0x%x ", *$bt->function + if $type == Lisp_Vectorlike + set $size = ((struct Lisp_Vector *) ((*$bt->function & $valmask) | gdb_data_seg_bits))->size + output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0) + else + printf "Lisp type %d", $type + end + echo \n + end 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. + an error was signaled. end define xreload