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: Itai Berli
Subject: Re: Help getting started debugging Emacs on macOS Sierra
Date: Sat, 12 Aug 2017 12:53:24 +0300

If I make a change to the code, for experimentation purposes, how do I compile it so I can see my change in action and debug it? Should I run

./autogen.sh
./autogen.sh git
CFLAGS='-O0 -g3' ./configure
make
make install

or can I simply compile the file that I changed with the compiler (GCC or Clang)?

On Fri, Aug 11, 2017 at 8:32 PM, Itai Berli <address@hidden> wrote:
Thank you, Eli.

On Fri, Aug 11, 2017 at 7:08 PM, Eli Zaretskii <address@hidden> wrote:
> 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]