]> git.eshelyaron.com Git - emacs.git/commitdiff
(xchartable): Adjusted for the change of char table
authorKenichi Handa <handa@m17n.org>
Fri, 1 Mar 2002 00:59:36 +0000 (00:59 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 1 Mar 2002 00:59:36 +0000 (00:59 +0000)
structure.
(xsubchartable, xcoding, xcharset, xcurbuf): New commands.

src/.gdbinit

index 233640b85176acdbd4760e05f6533e261b739b5f..86998b41209293c9be607b516b7f1f98592bc11f 100644 (file)
@@ -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