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: Fri, 11 Aug 2017 11:27:25 +0300

Eli wrote:

I suggest to rebuild Emacs without optimizations and with better debugging info:
>
>  CFLAGS='-O0 -g3' ./configure
> make
> make install

Thank you, Eli. Do I also need to run './autogen.sh' and './autogen.sh git' again?

On Fri, Aug 11, 2017 at 9:28 AM, Eli Zaretskii <address@hidden> wrote:
> From: Itai Berli <address@hidden>
> Date: Fri, 11 Aug 2017 02:25:17 +0300
>
> I'm interesting in exploring the Emacs bidi feature, which is coded in the files bidi.c and xdisp.c.
>
> To get my feet wet, I'd like to set a breakpoint in the beginning of one of the functions in one of these files, I
> don't care which one, and step through the function in a debugger.
>
> Not only am I new to Emacs development, I'm also new to developing C programs. Ideally, I'd like to do this in
> the Eclipse IDE for C/C++ Developers (Oxygen Release 4.7.0). However, I'm also willing to try another
> debugger, such as a command-line one, if it's easier to get started.
>
> My operating system is macOS Sierra Version 10.12.6 (the latest version). My LLVM version is 8.1.0
> (clang-802.0.42).
>
> I'll appreciate it if someone can walk me through the steps needed to get up and running.

I don't use macOS, and so cannot tell you how to use lldb to debug
Emacs.  Some advice is in etc/DEBUG, but its most useful parts are
heavily skewed towards GDB.  So if possible, I suggest to install GDB
for macOS, I'm sure some version of it is available.  That would allow
more people here to help you with specific commands and features of
the debugger.  Debugging support in src/.gdbinit is also GDB-specific,
and I don't know how well does lldb emulate GDB for the commands
defined on .gdbinit to work in lldb.

> I have downloaded Emacs from git by running
>
> > git clone git://git.savannah.gnu.org/emacs.git
>
> I then compiled and installed it by running the following sequence of scripts.
>
> > ./autogen.sh
> > ./autogen.sh git
> > ./configure
> > make
> > make install

The default build uses optimization switches, which make debugging
harder.  So I suggest to rebuild Emacs without optimizations and with
better debugging info:

  CFLAGS='-O0 -g3' ./configure
  make
  make install


reply via email to

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