aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2002-03-01 00:59:36 +0000
committerKenichi Handa2002-03-01 00:59:36 +0000
commitd5fb9ac8f445edc85a17616160fe8811414a6250 (patch)
treeaf3ba29ebaa6c32797a3476e5c7446e263129618 /src
parent3243b9f38e1e94eb26e9298d5e2d04ef28dc8677 (diff)
downloademacs-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/.gdbinit54
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
239define xchartable 239define xchartable
240print (struct Lisp_Char_Table *) (($ & $valmask) | gdb_data_seg_bits) 240print (struct Lisp_Char_Table *) (($ & $valmask) | gdb_data_seg_bits)
241printf "Purpose: " 241printf "Purpose: "
242output (char*)&((struct Lisp_Symbol *) ((((int) $->purpose) & $valmask) | gdb_data_seg_bits))->name->data 242output (char*)((struct Lisp_Symbol *) ((((int) $->purpose) & $valmask) | gdb_data_seg_bits))->name->data
243printf " %d extra slots", ($->size & 0x1ff) - 388 243printf " %d extra slots", ($->size & 0x1ff) - 68
244echo \n 244echo \n
245end 245end
246document xchartable 246document xchartable
@@ -248,6 +248,14 @@ Print the address of the char-table $, and its purpose.
248This command assumes that $ is an Emacs Lisp char-table value. 248This command assumes that $ is an Emacs Lisp char-table value.
249end 249end
250 250
251define xsubchartable
252print (struct Lisp_Sub_Char_Table *) (($ & $valmask) | gdb_data_seg_bits)
253end
254document xsubchartable
255Print the address of the sub-char-table $.
256This command assumes that $ is an Emacs Lisp sub-char-table value.
257end
258
251define xboolvector 259define xboolvector
252print (struct Lisp_Bool_Vector *) (($ & $valmask) | gdb_data_seg_bits) 260print (struct Lisp_Bool_Vector *) (($ & $valmask) | gdb_data_seg_bits)
253output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8) 261output ($->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.
333end 341end
334 342
343define 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
351end
352document xcoding
353 Print a coding system whose id is the argument.
354end
355
356define 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
361end
362document xcharset
363 Print a charset name whose id is the argument.
364end
365
366define 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
383end
384
335define xbacktrace 385define xbacktrace
336 set $bt = backtrace_list 386 set $bt = backtrace_list
337 while $bt 387 while $bt