Mercurial > emacs
comparison src/.gdbinit @ 55609:253acecd37f9
Mask off gdb_array_mark_flag from vector sizes.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Sat, 15 May 2004 16:43:30 +0000 |
parents | f9c48c0105bd |
children | 91c18484e1a2 ad01ab3c6f4d |
comparison
equal
deleted
inserted
replaced
55608:1d21085d1d46 | 55609:253acecd37f9 |
---|---|
79 end | 79 end |
80 | 80 |
81 define xvectype | 81 define xvectype |
82 xgetptr $ | 82 xgetptr $ |
83 set $size = ((struct Lisp_Vector *) $ptr)->size | 83 set $size = ((struct Lisp_Vector *) $ptr)->size |
84 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size | 84 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size & ~gdb_array_mark_flag |
85 echo \n | 85 echo \n |
86 end | 86 end |
87 document xvectype | 87 document xvectype |
88 Print the size or vector subtype of $, assuming it is a vector or pseudovector. | 88 Print the size or vector subtype of $, assuming it is a vector or pseudovector. |
89 end | 89 end |
197 end | 197 end |
198 | 198 |
199 define xstring | 199 define xstring |
200 xgetptr $ | 200 xgetptr $ |
201 print (struct Lisp_String *) $ptr | 201 print (struct Lisp_String *) $ptr |
202 output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte) | 202 output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size & ~gdb_array_mark_flag : $->size_byte) |
203 echo \n | 203 echo \n |
204 end | 204 end |
205 document xstring | 205 document xstring |
206 Print the contents and address of the string $. | 206 Print the contents and address of the string $. |
207 This command assumes that $ is an Emacs Lisp string value. | 207 This command assumes that $ is an Emacs Lisp string value. |
208 end | 208 end |
209 | 209 |
210 define xvector | 210 define xvector |
211 xgetptr $ | 211 xgetptr $ |
212 print (struct Lisp_Vector *) $ptr | 212 print (struct Lisp_Vector *) $ptr |
213 output ($->size > 50) ? 0 : ($->contents[0])@($->size) | 213 output ($->size > 50) ? 0 : ($->contents[0])@($->size & ~gdb_array_mark_flag) |
214 echo \n | 214 echo \n |
215 end | 215 end |
216 document xvector | 216 document xvector |
217 Print the contents and address of the vector $. | 217 Print the contents and address of the vector $. |
218 This command assumes that $ is an Emacs Lisp vector value. | 218 This command assumes that $ is an Emacs Lisp vector value. |
287 end | 287 end |
288 | 288 |
289 define xboolvector | 289 define xboolvector |
290 xgetptr $ | 290 xgetptr $ |
291 print (struct Lisp_Bool_Vector *) $ptr | 291 print (struct Lisp_Bool_Vector *) $ptr |
292 output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8) | 292 output ($->size > 256) ? 0 : ($->data[0])@((($->size & ~gdb_array_mark_flag) + 7)/ 8) |
293 echo \n | 293 echo \n |
294 end | 294 end |
295 document xboolvector | 295 document xboolvector |
296 Print the contents and address of the bool-vector $. | 296 Print the contents and address of the bool-vector $. |
297 This command assumes that $ is an Emacs Lisp bool-vector value. | 297 This command assumes that $ is an Emacs Lisp bool-vector value. |
375 define xprintsym | 375 define xprintsym |
376 xgetptr $arg0 | 376 xgetptr $arg0 |
377 set $sym = (struct Lisp_Symbol *) $ptr | 377 set $sym = (struct Lisp_Symbol *) $ptr |
378 xgetptr $sym->xname | 378 xgetptr $sym->xname |
379 set $sym_name = (struct Lisp_String *) $ptr | 379 set $sym_name = (struct Lisp_String *) $ptr |
380 output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size : $sym_name->size_byte) | 380 output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size & ~gdb_array_mark_flag : $sym_name->size_byte) |
381 end | 381 end |
382 document xprintsym | 382 document xprintsym |
383 Print argument as a symbol. | 383 Print argument as a symbol. |
384 end | 384 end |
385 | 385 |
393 else | 393 else |
394 printf "0x%x ", *$bt->function | 394 printf "0x%x ", *$bt->function |
395 if $type == Lisp_Vectorlike | 395 if $type == Lisp_Vectorlike |
396 xgetptr (*$bt->function) | 396 xgetptr (*$bt->function) |
397 set $size = ((struct Lisp_Vector *) $ptr)->size | 397 set $size = ((struct Lisp_Vector *) $ptr)->size |
398 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size | 398 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size & ~gdb_array_mark_flag |
399 else | 399 else |
400 printf "Lisp type %d", $type | 400 printf "Lisp type %d", $type |
401 end | 401 end |
402 echo \n | 402 echo \n |
403 end | 403 end |