From: Stefan Monnier Date: Wed, 19 May 2004 01:22:06 +0000 (+0000) Subject: (xprintstr): New fun. X-Git-Tag: ttn-vms-21-2-B4~6144 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0001e96851d9ea2060d12c5305c6818e222e0b34;p=emacs.git (xprintstr): New fun. (xstring, xprintsym): Use it. --- diff --git a/src/.gdbinit b/src/.gdbinit index 33f02f4edc0..3660155f62d 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -199,7 +199,7 @@ end define xstring xgetptr $ print (struct Lisp_String *) $ptr - output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size & ~gdb_array_mark_flag : $->size_byte) + xprintstr $ echo \n end document xstring @@ -372,12 +372,17 @@ document xscrollbar Print $ as a scrollbar pointer. end +define xprintstr + set $data = $arg0->data + output ($arg0->size > 1000) ? 0 : ($data[0])@($arg0->size_byte < 0 ? $arg0->size & ~gdb_array_mark_flag : $arg0->size_byte) +end + define xprintsym xgetptr $arg0 set $sym = (struct Lisp_Symbol *) $ptr xgetptr $sym->xname set $sym_name = (struct Lisp_String *) $ptr - output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size & ~gdb_array_mark_flag : $sym_name->size_byte) + xprintstr $sym_name end document xprintsym Print argument as a symbol.