]> code.delx.au - gnu-emacs/blobdiff - src/.gdbinit
Merge from emacs-24; up to 2012-12-17T11:17:34Z!rgm@gnu.org
[gnu-emacs] / src / .gdbinit
index f187bafcba769fd2c7d22a92cb32df15fd31055c..4215ffa312b492b7ca9ad4e111b3512ad86b0776 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-1998, 2000-201 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 <http://www.gnu.org/licenses/>.
 
 # 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