comparison src/.gdbinit @ 88349:e5d55ed9b335

(xchartable): Adjusted for the change of char table structure. (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
author Kenichi Handa <handa@m17n.org>
date Fri, 01 Mar 2002 00:59:36 +0000
parents 1865230232b7
children 2f877ed80fa6
comparison
equal deleted inserted replaced
43578:fa66c2edee4d 88349:e5d55ed9b335
237 end 237 end
238 238
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
247 Print the address of the char-table $, and its purpose. 247 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
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.
249 end 257 end
250 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)
328 output (char*)$sym->name->data 336 output (char*)$sym->name->data
329 echo \n 337 echo \n
330 end 338 end
331 document xprintsym 339 document xprintsym
332 Print argument as a symbol. 340 Print argument as a symbol.
341 end
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
333 end 383 end
334 384
335 define xbacktrace 385 define xbacktrace
336 set $bt = backtrace_list 386 set $bt = backtrace_list
337 while $bt 387 while $bt