From: Kenichi Handa Date: Fri, 1 Mar 2002 00:59:36 +0000 (+0000) Subject: (xchartable): Adjusted for the change of char table X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~1032 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d5fb9ac8f445edc85a17616160fe8811414a6250;p=emacs.git (xchartable): Adjusted for the change of char table structure. (xsubchartable, xcoding, xcharset, xcurbuf): New commands. --- diff --git a/src/.gdbinit b/src/.gdbinit index 233640b8517..86998b41209 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -239,8 +239,8 @@ 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 +output (char*)((struct Lisp_Symbol *) ((((int) $->purpose) & $valmask) | gdb_data_seg_bits))->name->data +printf " %d extra slots", ($->size & 0x1ff) - 68 echo \n end document xchartable @@ -248,6 +248,14 @@ Print the address of the char-table $, and its purpose. This command assumes that $ is an Emacs Lisp char-table value. end +define xsubchartable +print (struct Lisp_Sub_Char_Table *) (($ & $valmask) | gdb_data_seg_bits) +end +document xsubchartable +Print the address of the sub-char-table $. +This command assumes that $ is an Emacs Lisp sub-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) @@ -332,6 +340,48 @@ document xprintsym Print argument as a symbol. end +define xcoding + set $tmp = (struct Lisp_Hash_Table *) ((Vcoding_system_hash_table & $valmask) | gdb_data_seg_bits) + set $tmp = (struct Lisp_Vector *) (($tmp->key_and_value & $valmask) | gdb_data_seg_bits) + set $name = $tmp->contents[$arg0 * 2] + print $name + pr + print $tmp->contents[$arg0 * 2 + 1] + pr +end +document xcoding + Print a coding system whose id is the argument. +end + +define xcharset + set $tmp = (struct Lisp_Hash_Table *) ((Vcharset_hash_table & $valmask) | gdb_data_seg_bits) + set $tmp = (struct Lisp_Vector *) (($tmp->key_and_value & $valmask) | gdb_data_seg_bits) + p $tmp->contents[$arg0->hash_index * 2] + pr +end +document xcharset + Print a charset name whose id is the argument. +end + +define xcurbuf + echo GAPSIZE: + output current_buffer->text->gap_size + echo \nGPT: + output current_buffer->text->gpt + echo / + output current_buffer->text->gpt_byte + echo \nZ: + output current_buffer->text->z + echo / + output current_buffer->text->z_byte + echo \nTEXT: + if current_buffer->text->gpt > 1 + print current_buffer->text->beg[0]@80 + else + print current_buffer->text->beg[current_buffer->text->gpt_byte-1]@80 + end +end + define xbacktrace set $bt = backtrace_list while $bt