diff src/.gdbinit @ 107605:b1e1b45c9fb6

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.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 01 Jan 2010 09:57:27 -0500
parents dd4b6b2fe706
children 297c59e52ecf
line wrap: on
line diff
--- a/src/.gdbinit	Fri Jan 01 09:46:25 2010 -0500
+++ b/src/.gdbinit	Fri Jan 01 09:57:27 2010 -0500
@@ -447,6 +447,33 @@
 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 @@
   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)