Mercurial > emacs
changeset 22012:4379a41b6f2e
(xstring): Handle unibyte strings.
(xchartable, xboolvector): New commands.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 10 May 1998 01:13:11 +0000 |
parents | e849b602b425 |
children | c97adaf9f770 |
files | src/.gdbinit |
diffstat | 1 files changed, 65 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/src/.gdbinit Sun May 10 00:40:00 1998 +0000 +++ b/src/.gdbinit Sun May 10 01:13:11 1998 +0000 @@ -69,15 +69,6 @@ Print the pointer portion of $, assuming it is an Emacs Lisp value. end -define xwindow -print (struct window *) (($ & $valmask) | gdb_data_seg_bits) -printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top -end -document xwindow -Print $ as a window pointer, assuming it is an Emacs Lisp window value. -Print the window's position as "WIDTHxHEIGHT+LEFT+TOP". -end - define xmarker print (struct Lisp_Marker *) (($ & $valmask) | gdb_data_seg_bits) end @@ -141,16 +132,6 @@ Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value. end -define xbuffer -print (struct buffer *) (($ & $valmask) | gdb_data_seg_bits) -output &((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data -echo \n -end -document xbuffer -Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value. -Print the name of the buffer. -end - define xsymbol print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits) output (char*)&$->name->data @@ -163,7 +144,7 @@ define xstring print (struct Lisp_String *) (($ & $valmask) | gdb_data_seg_bits) -output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte) +output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte) echo \n end document xstring @@ -181,6 +162,15 @@ This command assumes that $ is an Emacs Lisp vector value. end +define xprocess +print (struct Lisp_Process *) (($ & $valmask) | gdb_data_seg_bits) +output *$ +echo \n +end +document xprocess +Print the address of the struct Lisp_process which the Lisp_Object $ points to. +end + define xframe print (struct frame *) (($ & $valmask) | gdb_data_seg_bits) end @@ -188,6 +178,23 @@ Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. end +define xcompiled +print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) +output ($->contents[0])@($->size & 0xff) +end +document xcompiled +Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. +end + +define xwindow +print (struct window *) (($ & $valmask) | gdb_data_seg_bits) +printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top +end +document xwindow +Print $ as a window pointer, assuming it is an Emacs Lisp window value. +Print the window's position as "WIDTHxHEIGHT+LEFT+TOP". +end + define xwinconfig print (struct save_window_data *) (($ & $valmask) | gdb_data_seg_bits) end @@ -195,12 +202,45 @@ Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value. end -define xcompiled -print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) -output ($->contents[0])@($->size & 0xff) +define xsubr +print (struct Lisp_Subr *) (($ & $valmask) | gdb_data_seg_bits) +output *$ +echo \n +end +document xsubr +Print the address of the subr which the Lisp_Object $ points to. +end + +define xchartable +print (struct Lisp_Char_Table *) (($ & $valmask) | gdb_data_seg_bits) +printf "Purpose: " +output (char*)&((struct Lisp_Symbol *) ((((int) $->purpose) & $valmask) | gdb_data_seg_bits))->name->data +printf " %d extra slots", ($->size & 0x1ff) - 388 +echo \n +end +document xchartable +Print the address of the char-table $, and its purpose. +This command assumes that $ is an Emacs Lisp char-table value. end -document xcompiled -Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. + +define xboolvector +print (struct Lisp_Bool_Vector *) (($ & $valmask) | gdb_data_seg_bits) +output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8) +echo \n +end +document xboolvector +Print the contents and address of the bool-vector $. +This command assumes that $ is an Emacs Lisp bool-vector value. +end + +define xbuffer +print (struct buffer *) (($ & $valmask) | gdb_data_seg_bits) +output &((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data +echo \n +end +document xbuffer +Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value. +Print the name of the buffer. end define xcons @@ -235,24 +275,6 @@ Print the cdr of $, assuming it is an Emacs Lisp pair. end -define xsubr -print (struct Lisp_Subr *) (($ & $valmask) | gdb_data_seg_bits) -output *$ -echo \n -end -document xsubr -Print the address of the subr which the Lisp_Object $ points to. -end - -define xprocess -print (struct Lisp_Process *) (($ & $valmask) | gdb_data_seg_bits) -output *$ -echo \n -end -document xprocess -Print the address of the struct Lisp_process which the Lisp_Object $ points to. -end - define xfloat print ((struct Lisp_Float *) (($ & $valmask) | gdb_data_seg_bits))->data end