summaryrefslogtreecommitdiff
path: root/src/.gdbinit
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2010-01-01 09:57:27 -0500
committerEli Zaretskii <eliz@gnu.org>2010-01-01 09:57:27 -0500
commitbc5a45f315808b1d7335bdc9ea0168b89782c101 (patch)
tree28bdf150710bb625327f9ec36ed74407e4627da6 /src/.gdbinit
parente69a937075490a19d1b767e166d10f0e838b4173 (diff)
downloademacs-bc5a45f315808b1d7335bdc9ea0168b89782c101.tar.gz
Retrospective commit from 2009-1219.
Fix reordering of Arabic text in etc/HELLO. Extend .gdbinit commands to support bidirectional display. buffer.c (Fbuffer_swap_text): Swap the values of bidi_display_reordering and bidi_paragraph_direction. bidi.c (bidi_resolve_weak): Fix nesting of conditions for Wn processing. Move W3 after W1 and W2. Simplify W4 because it is now always after W1. .gdbinit (pbiditype): New command. (pgx): Use it to display bidi level and type of the glyph.
Diffstat (limited to 'src/.gdbinit')
-rw-r--r--src/.gdbinit32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index e8a64f5dfe4..61e3da6c68c 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -447,6 +447,33 @@ document pwin
Pretty print window structure w.
end
+define pbiditype
+ 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 < 1 || $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
@@ -475,6 +502,11 @@ define pgx
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)