X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/914adc427f7d1159356e465ec616c65a2ea902af..01fcc3a532872b29784a4d888ab9cc1aef0eed01:/src/.gdbinit diff --git a/src/.gdbinit b/src/.gdbinit index f187bafcba..4215ffa312 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -1,4 +1,4 @@ -# Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1998, 2000-2013 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -13,9 +13,7 @@ # 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., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. +# along with GNU Emacs. If not, see . # Force loading of symbols, enough to give us VALBITS etc. set $dummy = main + 8 @@ -360,7 +358,6 @@ end define pwinx set $w = $arg0 - xgetint $w->sequence_number if ($w->mini_p != Qnil) printf "Mini " end @@ -495,7 +492,8 @@ define pgx end xgettype ($g.object) if ($type == Lisp_String) - printf " str=%x[%d]", $g.object, $g.charpos + xgetptr $g.object + printf " str=0x%x[%d]", ((struct Lisp_String *)$ptr)->data, $g.charpos else printf " pos=%d", $g.charpos end @@ -650,9 +648,8 @@ If the first type printed is Lisp_Vector or Lisp_Misc, a second line gives the more precise type. end -define xvectype - xgetptr $ - set $size = ((struct Lisp_Vector *) $ptr)->header.size +define pvectype + set $size = ((struct Lisp_Vector *) $arg0)->header.size if ($size & PSEUDOVECTOR_FLAG) output (enum pvec_type) (($size & PVEC_TYPE_MASK) >> PSEUDOVECTOR_AREA_BITS) else @@ -660,14 +657,22 @@ define xvectype end echo \n end -document xvectype -Print the type or vector subtype of $. -This command assumes that $ is a vector or pseudovector. +document pvectype +Print the subtype of vectorlike object. +Takes one argument, a pointer to an object. end -define xvecsize +define xvectype xgetptr $ - set $size = ((struct Lisp_Vector *) $ptr)->header.size + pvectype $ptr +end +document xvectype +Print the subtype of vectorlike object. +This command assumes that $ is a Lisp_Object. +end + +define pvecsize + set $size = ((struct Lisp_Vector *) $arg0)->header.size if ($size & PSEUDOVECTOR_FLAG) output ($size & PSEUDOVECTOR_SIZE_MASK) echo \n @@ -677,9 +682,18 @@ define xvecsize end echo \n end +document pvecsize +Print the size of vectorlike object. +Takes one argument, a pointer to an object. +end + +define xvecsize + xgetptr $ + pvecsize $ptr +end document xvecsize -Print the size or vector subtype of $. -This command assumes that $ is a vector or pseudovector. +Print the size of $ +This command assumes that $ is a Lisp_Object. end define xmisctype