# Force loading of symbols, enough to give us gdb_valbits etc.
set main
+# With some compilers, we need this to give us struct Lisp_Symbol etc.:
+set Fmake_symbol
# Find lwlib source files too.
dir ../lwlib
end
end
printf "\n"
+ if ($it->bidi_p)
+ printf "BIDI: base_stop=%d prev_stop=%d level=%d\n", $it->base_level_stop, $it->prev_stop, $it->bidi_it.resolved_level
+ end
if ($it->region_beg_charpos >= 0)
printf "reg=%d-%d ", $it->region_beg_charpos, $it->region_end_charpos
end
Pretty print window structure w.
end
+define pbiditype
+ if ($arg0 == 0)
+ printf "UNDEF"
+ end
+ if ($arg0 == 1)
+ printf "L"
+ end
+ if ($arg0 == 2)
+ printf "R"
+ end
+ if ($arg0 == 3)
+ printf "EN"
+ end
+ if ($arg0 == 4)
+ printf "AN"
+ end
+ if ($arg0 == 5)
+ printf "BN"
+ end
+ if ($arg0 == 6)
+ printf "B"
+ end
+ if ($arg0 < 0 || $arg0 > 6)
+ printf "%d??", $arg0
+ end
+end
+document pbiditype
+Print textual description of bidi type given as first argument.
+end
+
define pgx
set $g = $arg0
# CHAR_GLYPH
end
# COMPOSITE_GLYPH
if ($g->type == 1)
- printf "COMP[%d (%d..%d)]", $g->u.cmp.id, $g->u.cmp.from, $g->u.cmp.to
+ printf "COMP[%d (%d..%d)]", $g->u.cmp.id, $g->slice.cmp.from, $g->slice.cmp.to
end
- # IMAGE_GLYPH
+ # GLYPHLESS_GLYPH
if ($g->type == 2)
+ printf "GLYPHLESS["
+ if ($g->u.glyphless.method == 0)
+ printf "THIN]"
+ end
+ if ($g->u.glyphless.method == 1)
+ printf "EMPTY]"
+ end
+ if ($g->u.glyphless.method == 2)
+ printf "ACRO]"
+ end
+ if ($g->u.glyphless.method == 3)
+ printf "HEX]"
+ end
+ end
+ # IMAGE_GLYPH
+ if ($g->type == 3)
printf "IMAGE[%d]", $g->u.img_id
end
# STRETCH_GLYPH
- if ($g->type == 3)
+ if ($g->type == 4)
printf "STRETCH[%d+%d]", $g->u.stretch.height, $g->u.stretch.ascent
end
xgettype ($g->object)
else
printf " pos=%d", $g->charpos
end
+ # For characters, print their resolved level and bidi type
+ if ($g->type == 0)
+ printf " blev=%d,btyp=", $g->resolved_level
+ pbiditype $g->bidi_type
+ end
printf " w=%d a+d=%d+%d", $g->pixel_width, $g->ascent, $g->descent
# If not DEFAULT_FACE_ID
if ($g->face_id != 0)
if ($g->overlaps_vertically_p)
printf " OVL"
end
+ if ($g->avoid_cursor_p)
+ printf " AVOID"
+ end
if ($g->left_box_line_p)
printf " ["
end
if ($g->right_box_line_p)
printf " ]"
end
- if ($g->slice.x || $g->slice.y || $g->slice.width || $g->slice.height)
- printf " slice=%d,%d,%d,%d" ,$g->slice.x, $g->slice.y, $g->slice.width, $g->slice.height
+ if ($g->slice.img.x || $g->slice.img.y || $g->slice.img.width || $g->slice.img.height)
+ printf " slice=%d,%d,%d,%d" ,$g->slice.img.x, $g->slice.img.y, $g->slice.img.width, $g->slice.img.height
end
printf "\n"
end
Pretty print all glyphs in it->glyph_row.
end
+define prowlims
+ printf "edges=(%d,%d),r2l=%d,cont=%d,trunc=(%d,%d),at_zv=%d\n", $arg0->minpos.charpos, $arg0->maxpos.charpos, $arg0->reversed_p, $arg0->continued_p, $arg0->truncated_on_left_p, $arg0->truncated_on_right_p, $arg0->ends_at_zv_p
+end
+document prowlims
+Print important attributes of a glyph_row structure.
+Takes one argument, a pointer to a glyph_row structure.
+end
+
+define pmtxrows
+ set $mtx = $arg0
+ set $gl = $mtx->rows
+ set $glend = $mtx->rows + $mtx->nrows - 1
+ set $i = 0
+ while ($gl < $glend)
+ printf "%d: ", $i
+ prowlims $gl
+ set $gl = $gl + 1
+ set $i = $i + 1
+ end
+end
+document pmtxrows
+Print data about glyph rows in a glyph matrix.
+Takes one argument, a pointer to a glyph_matrix structure.
+end
+
define xtype
xgettype $
output $type
This command assumes that $ is an Emacs Lisp char-table value.
end
+define xsubchartable
+ xgetptr $
+ print (struct Lisp_Sub_Char_Table *) $ptr
+ xgetint $->depth
+ set $depth = $int
+ xgetint $->min_char
+ printf "Depth: %d, Min char: %d (0x%x)\n", $depth, $int, $int
+end
+document xsubchartable
+Print the address of the sub-char-table $, its depth and min-char.
+This command assumes that $ is an Emacs Lisp sub-char-table value.
+end
+
define xboolvector
xgetptr $
print (struct Lisp_Bool_Vector *) $ptr