emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help getting started debugging Emacs on macOS Sierra


From: Eli Zaretskii
Subject: Re: Help getting started debugging Emacs on macOS Sierra
Date: Fri, 11 Aug 2017 19:08:28 +0300

> From: Itai Berli <address@hidden>
> Date: Fri, 11 Aug 2017 18:34:08 +0300
> Cc: Emacs developers <address@hidden>
> 
> > Tell me what you want to do and with what text, and then I might be able to 
> > help you do
> that in a more useful way.
> 
> I just want to get more familiar with the bidi algorithm and the way it is 
> implemented by Emacs. I'd like to try
> various small phrases, such as the ones that can be found in this article:
> https://www.w3.org/International/articles/inline-bidi-markup/uba-basics

After entering GDB, set a breakpoint in a function called
Fredraw_display, then run Emacs ("run -Q").  Insert the text you want,
then move point to its beginning and type "C-x =".  Remember the
buffer position displayed as result, let's call it POS.

Then type "M-x redraw-display RET".  GDB will get control, and you can
now put breakpoints where you want.  For tracing through the bidi.c
code, I'd suggest this:

  (gdb) break bidi_get_next_char_visually if bidi_it->charpos == POS
  (gdb) continue

When the breakpoint in bidi_get_next_char_visually breaks, you can
step through the code using the "step" and "next" commands (you have
tool-bar buttons for them).

Note that bidi_get_next_char_visually is called for each character the
display engine wants to display, so when it returns, it puts in
bidi_it->charpos the position of the next character in visual order.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]