aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1998-05-10 01:13:11 +0000
committerRichard M. Stallman1998-05-10 01:13:11 +0000
commit14a8902aad57782a0f781405a561efe839b5c7f3 (patch)
tree4b64f312e127f6a3456c6ef0b170983446bd332b /src
parente6b506397310455f7aee813dd29f196bd702e411 (diff)
downloademacs-14a8902aad57782a0f781405a561efe839b5c7f3.tar.gz
emacs-14a8902aad57782a0f781405a561efe839b5c7f3.zip
(xstring): Handle unibyte strings.
(xchartable, xboolvector): New commands.
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit108
1 files changed, 65 insertions, 43 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index 9bfc9ddf2e7..406e02def59 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -69,15 +69,6 @@ document xptr
69Print the pointer portion of $, assuming it is an Emacs Lisp value. 69Print the pointer portion of $, assuming it is an Emacs Lisp value.
70end 70end
71 71
72define xwindow
73print (struct window *) (($ & $valmask) | gdb_data_seg_bits)
74printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top
75end
76document xwindow
77Print $ as a window pointer, assuming it is an Emacs Lisp window value.
78Print the window's position as "WIDTHxHEIGHT+LEFT+TOP".
79end
80
81define xmarker 72define xmarker
82print (struct Lisp_Marker *) (($ & $valmask) | gdb_data_seg_bits) 73print (struct Lisp_Marker *) (($ & $valmask) | gdb_data_seg_bits)
83end 74end
@@ -141,16 +132,6 @@ document xbuflocal
141Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value. 132Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value.
142end 133end
143 134
144define xbuffer
145print (struct buffer *) (($ & $valmask) | gdb_data_seg_bits)
146output &((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data
147echo \n
148end
149document xbuffer
150Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value.
151Print the name of the buffer.
152end
153
154define xsymbol 135define xsymbol
155print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits) 136print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits)
156output (char*)&$->name->data 137output (char*)&$->name->data
@@ -163,7 +144,7 @@ end
163 144
164define xstring 145define xstring
165print (struct Lisp_String *) (($ & $valmask) | gdb_data_seg_bits) 146print (struct Lisp_String *) (($ & $valmask) | gdb_data_seg_bits)
166output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte) 147output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte)
167echo \n 148echo \n
168end 149end
169document xstring 150document xstring
@@ -181,6 +162,15 @@ Print the contents and address of the vector $.
181This command assumes that $ is an Emacs Lisp vector value. 162This command assumes that $ is an Emacs Lisp vector value.
182end 163end
183 164
165define xprocess
166print (struct Lisp_Process *) (($ & $valmask) | gdb_data_seg_bits)
167output *$
168echo \n
169end
170document xprocess
171Print the address of the struct Lisp_process which the Lisp_Object $ points to.
172end
173
184define xframe 174define xframe
185print (struct frame *) (($ & $valmask) | gdb_data_seg_bits) 175print (struct frame *) (($ & $valmask) | gdb_data_seg_bits)
186end 176end
@@ -188,6 +178,23 @@ document xframe
188Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. 178Print $ as a frame pointer, assuming it is an Emacs Lisp frame value.
189end 179end
190 180
181define xcompiled
182print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits)
183output ($->contents[0])@($->size & 0xff)
184end
185document xcompiled
186Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value.
187end
188
189define xwindow
190print (struct window *) (($ & $valmask) | gdb_data_seg_bits)
191printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top
192end
193document xwindow
194Print $ as a window pointer, assuming it is an Emacs Lisp window value.
195Print the window's position as "WIDTHxHEIGHT+LEFT+TOP".
196end
197
191define xwinconfig 198define xwinconfig
192print (struct save_window_data *) (($ & $valmask) | gdb_data_seg_bits) 199print (struct save_window_data *) (($ & $valmask) | gdb_data_seg_bits)
193end 200end
@@ -195,12 +202,45 @@ document xwinconfig
195Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value. 202Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value.
196end 203end
197 204
198define xcompiled 205define xsubr
199print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) 206print (struct Lisp_Subr *) (($ & $valmask) | gdb_data_seg_bits)
200output ($->contents[0])@($->size & 0xff) 207output *$
208echo \n
201end 209end
202document xcompiled 210document xsubr
203Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. 211Print the address of the subr which the Lisp_Object $ points to.
212end
213
214define xchartable
215print (struct Lisp_Char_Table *) (($ & $valmask) | gdb_data_seg_bits)
216printf "Purpose: "
217output (char*)&((struct Lisp_Symbol *) ((((int) $->purpose) & $valmask) | gdb_data_seg_bits))->name->data
218printf " %d extra slots", ($->size & 0x1ff) - 388
219echo \n
220end
221document xchartable
222Print the address of the char-table $, and its purpose.
223This command assumes that $ is an Emacs Lisp char-table value.
224end
225
226define xboolvector
227print (struct Lisp_Bool_Vector *) (($ & $valmask) | gdb_data_seg_bits)
228output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8)
229echo \n
230end
231document xboolvector
232Print the contents and address of the bool-vector $.
233This command assumes that $ is an Emacs Lisp bool-vector value.
234end
235
236define xbuffer
237print (struct buffer *) (($ & $valmask) | gdb_data_seg_bits)
238output &((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data
239echo \n
240end
241document xbuffer
242Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value.
243Print the name of the buffer.
204end 244end
205 245
206define xcons 246define xcons
@@ -235,24 +275,6 @@ document xcdr
235Print the cdr of $, assuming it is an Emacs Lisp pair. 275Print the cdr of $, assuming it is an Emacs Lisp pair.
236end 276end
237 277
238define xsubr
239print (struct Lisp_Subr *) (($ & $valmask) | gdb_data_seg_bits)
240output *$
241echo \n
242end
243document xsubr
244Print the address of the subr which the Lisp_Object $ points to.
245end
246
247define xprocess
248print (struct Lisp_Process *) (($ & $valmask) | gdb_data_seg_bits)
249output *$
250echo \n
251end
252document xprocess
253Print the address of the struct Lisp_process which the Lisp_Object $ points to.
254end
255
256define xfloat 278define xfloat
257print ((struct Lisp_Float *) (($ & $valmask) | gdb_data_seg_bits))->data 279print ((struct Lisp_Float *) (($ & $valmask) | gdb_data_seg_bits))->data
258end 280end