# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
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]
+ p $tmp->contents[charset_table[$arg0].hash_index * 2]
pr
end
document xcharset
echo \n
end
+define xfont
+ xgetptr $
+ set $size = (((struct Lisp_Vector *) $ptr)->size & 0x1FF)
+ if $size == FONT_SPEC_MAX
+ print (struct font_spec *) $ptr
+ else
+ if $size == FONT_ENTITY_MAX
+ print (struct font_entity *) $ptr
+ else
+ print (struct font *) $ptr
+ end
+ end
+end
+document xfont
+Print $ assuming it is a list font (font-spec, font-entity, or font-object).
+end
+
define xbacktrace
set $bt = backtrace_list
while $bt
show environment DISPLAY
show environment TERM
-set args -geometry 80x40+0+0
# People get bothered when they see messages about non-existent functions...
xgetptr Vsystem_type