mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-09 15:50:21 +00:00
(xstring): Handle unibyte strings.
(xchartable, xboolvector): New commands.
This commit is contained in:
parent
e6b5063973
commit
14a8902aad
108
src/.gdbinit
108
src/.gdbinit
@ -69,15 +69,6 @@ document xptr
|
||||
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 @@ document xbuflocal
|
||||
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 @@ end
|
||||
|
||||
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 @@ Print the contents and address of the vector $.
|
||||
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 @@ document xframe
|
||||
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 @@ document xwinconfig
|
||||
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
|
||||
@ -235,24 +275,6 @@ document xcdr
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user