diff src/.gdbinit @ 107639:844012bdb5dd

Continue debugging continuation lines. .gdbinit (prowlims, pmtxrows): New commands. xdisp.c (display_line): Special-case the calculation of row->end in rows that end at ZV, to avoid abort in CHAR_TO_BYTE. Handle empty lines correctly when calculating row's max and min pos. Display cursor at the first glyph row that has its ends_at_zv_p flag set.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 06 Mar 2010 11:06:24 -0500
parents 118ff750e43e
children d65c199e8bdd
line wrap: on
line diff
--- a/src/.gdbinit	Sat Mar 06 05:16:27 2010 -0500
+++ b/src/.gdbinit	Sat Mar 06 11:06:24 2010 -0500
@@ -613,6 +613,28 @@
 Pretty print all glyphs in it->glyph_row.
 end
 
+define prowlims
+  printf "start=%d,end=%d,reversed=%d,cont=%d\n", $arg0->start.pos.charpos, $arg0->end.pos.charpos, $arg0->reversed_p, $arg0->continued_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
+  while ($gl < $glend)
+    prowlims $gl
+    set $gl = $gl + 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