X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/be9e83310e761e95862cb453e28b05d7b48d25ef..88cd462dc6e6ed9441337f496f818b5fee5f5912:/src/.gdbinit diff --git a/src/.gdbinit b/src/.gdbinit index d9600338ed..ca6f5f255a 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -1,3 +1,23 @@ +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Emacs. +# +# GNU Emacs is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Emacs is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Emacs; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + # Force loading of symbols, enough to give us gdb_valbits etc. set main @@ -139,8 +159,7 @@ end define xsymbol print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits) -output (char*)$->name->data -echo \n +xprintsym $ end document xsymbol Print the name and address of the symbol $. @@ -240,7 +259,7 @@ end define xbuffer print (struct buffer *) (($ & $valmask) | gdb_data_seg_bits) -output &((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data +output ((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data echo \n end document xbuffer @@ -305,7 +324,8 @@ end define xprintsym set $sym = (struct Lisp_Symbol *) ((((int) $arg0) & $valmask) | gdb_data_seg_bits) - output (char*)$sym->name->data + set $sym_name = ((struct Lisp_String *)(($sym->xname & $valmask) | gdb_data_seg_bits)) + output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size : $sym_name->size_byte) echo \n end document xprintsym @@ -314,7 +334,7 @@ end define xbacktrace set $bt = backtrace_list - while $bt + while $bt set $type = (enum Lisp_Type) ((*$bt->function >> gdb_valbits) & 0x7) if $type == Lisp_Symbol xprintsym *$bt->function @@ -333,7 +353,7 @@ define xbacktrace 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 + Set a breakpoint at Fsignal and call this to see from where an error was signaled. end @@ -353,6 +373,11 @@ define hook-run xreload end +# Call xreload if a new Emacs executable is loaded. +define hookpost-run + xreload +end + set print pretty on set print sevenbit-strings