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
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
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
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
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
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 xcompiled
-Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value.
+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
+
+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
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