diff options
| author | Kenichi Handa | 2002-03-01 00:59:36 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-03-01 00:59:36 +0000 |
| commit | d5fb9ac8f445edc85a17616160fe8811414a6250 (patch) | |
| tree | af3ba29ebaa6c32797a3476e5c7446e263129618 /src | |
| parent | 3243b9f38e1e94eb26e9298d5e2d04ef28dc8677 (diff) | |
| download | emacs-d5fb9ac8f445edc85a17616160fe8811414a6250.tar.gz emacs-d5fb9ac8f445edc85a17616160fe8811414a6250.zip | |
(xchartable): Adjusted for the change of char table
structure.
(xsubchartable, xcoding, xcharset, xcurbuf): New commands.
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gdbinit | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 233640b8517..86998b41209 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -239,8 +239,8 @@ end | |||
| 239 | define xchartable | 239 | define xchartable |
| 240 | print (struct Lisp_Char_Table *) (($ & $valmask) | gdb_data_seg_bits) | 240 | print (struct Lisp_Char_Table *) (($ & $valmask) | gdb_data_seg_bits) |
| 241 | printf "Purpose: " | 241 | printf "Purpose: " |
| 242 | output (char*)&((struct Lisp_Symbol *) ((((int) $->purpose) & $valmask) | gdb_data_seg_bits))->name->data | 242 | output (char*)((struct Lisp_Symbol *) ((((int) $->purpose) & $valmask) | gdb_data_seg_bits))->name->data |
| 243 | printf " %d extra slots", ($->size & 0x1ff) - 388 | 243 | printf " %d extra slots", ($->size & 0x1ff) - 68 |
| 244 | echo \n | 244 | echo \n |
| 245 | end | 245 | end |
| 246 | document xchartable | 246 | document xchartable |
| @@ -248,6 +248,14 @@ Print the address of the char-table $, and its purpose. | |||
| 248 | This command assumes that $ is an Emacs Lisp char-table value. | 248 | This command assumes that $ is an Emacs Lisp char-table value. |
| 249 | end | 249 | end |
| 250 | 250 | ||
| 251 | define xsubchartable | ||
| 252 | print (struct Lisp_Sub_Char_Table *) (($ & $valmask) | gdb_data_seg_bits) | ||
| 253 | end | ||
| 254 | document xsubchartable | ||
| 255 | Print the address of the sub-char-table $. | ||
| 256 | This command assumes that $ is an Emacs Lisp sub-char-table value. | ||
| 257 | end | ||
| 258 | |||
| 251 | define xboolvector | 259 | define xboolvector |
| 252 | print (struct Lisp_Bool_Vector *) (($ & $valmask) | gdb_data_seg_bits) | 260 | print (struct Lisp_Bool_Vector *) (($ & $valmask) | gdb_data_seg_bits) |
| 253 | output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8) | 261 | output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8) |
| @@ -332,6 +340,48 @@ document xprintsym | |||
| 332 | Print argument as a symbol. | 340 | Print argument as a symbol. |
| 333 | end | 341 | end |
| 334 | 342 | ||
| 343 | define xcoding | ||
| 344 | set $tmp = (struct Lisp_Hash_Table *) ((Vcoding_system_hash_table & $valmask) | gdb_data_seg_bits) | ||
| 345 | set $tmp = (struct Lisp_Vector *) (($tmp->key_and_value & $valmask) | gdb_data_seg_bits) | ||
| 346 | set $name = $tmp->contents[$arg0 * 2] | ||
| 347 | print $name | ||
| 348 | pr | ||
| 349 | print $tmp->contents[$arg0 * 2 + 1] | ||
| 350 | pr | ||
| 351 | end | ||
| 352 | document xcoding | ||
| 353 | Print a coding system whose id is the argument. | ||
| 354 | end | ||
| 355 | |||
| 356 | define xcharset | ||
| 357 | set $tmp = (struct Lisp_Hash_Table *) ((Vcharset_hash_table & $valmask) | gdb_data_seg_bits) | ||
| 358 | set $tmp = (struct Lisp_Vector *) (($tmp->key_and_value & $valmask) | gdb_data_seg_bits) | ||
| 359 | p $tmp->contents[$arg0->hash_index * 2] | ||
| 360 | pr | ||
| 361 | end | ||
| 362 | document xcharset | ||
| 363 | Print a charset name whose id is the argument. | ||
| 364 | end | ||
| 365 | |||
| 366 | define xcurbuf | ||
| 367 | echo GAPSIZE: | ||
| 368 | output current_buffer->text->gap_size | ||
| 369 | echo \nGPT: | ||
| 370 | output current_buffer->text->gpt | ||
| 371 | echo / | ||
| 372 | output current_buffer->text->gpt_byte | ||
| 373 | echo \nZ: | ||
| 374 | output current_buffer->text->z | ||
| 375 | echo / | ||
| 376 | output current_buffer->text->z_byte | ||
| 377 | echo \nTEXT: | ||
| 378 | if current_buffer->text->gpt > 1 | ||
| 379 | print current_buffer->text->beg[0]@80 | ||
| 380 | else | ||
| 381 | print current_buffer->text->beg[current_buffer->text->gpt_byte-1]@80 | ||
| 382 | end | ||
| 383 | end | ||
| 384 | |||
| 335 | define xbacktrace | 385 | define xbacktrace |
| 336 | set $bt = backtrace_list | 386 | set $bt = backtrace_list |
| 337 | while $bt | 387 | while $bt |