[Top][All Lists]

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

Re: How to build Emacs with debugging information?

From: Oleh
Subject: Re: How to build Emacs with debugging information?
Date: Sat, 24 Jan 2015 21:52:13 +0100

> What exactly do you want here?  Do you really just want to know the
> answer to your question about scanning "<" and ">", or do you
> specifically want to find it out yourself with the debugger?  If it's the
> first of these, I can tell you.  ;-)

The second.

> If it's the second of these, ....
>> Anyway, stepping with gdb, inside another Emacs instance, I see that
>> many values are "<optimized out>", e.g.
>>     (gdb) p found
>>     $1 = <optimized out>
>> Normally I would pass "-g -O0" flags to gcc to solve this for the
>> C/C++ programs that I write. How can I do the equivalent thing for
>> Emacs?
> You'll need to reconfigure and rebuild Emacs.  If you're on a GNU or
> other Unix-like system, do something like:
>     $ CFLAGS='-g3 -O0' ./configure <other arguments>
> , then call make in the usual way.  (If you're on a different OS, such as
> Microsoft Windows, then I can't help you here, but somebody else will.)
>> Is there a way to have both the "debug" and "release" configurations
>> for the Emacs executable?
> I'm not sure what you mean by "configurations", but you can have two
> Emacs executables side by side.  (Again, on GNU etc.,) when you build
> Emacs, the executable is called something like emacs-, where the
> 4 is incremented each time you build.  The last build is hard linked to
> the file emacs.  So you just have the hassle of typing in "-"
> when you start the "release" version.

Thanks, it works just as I wanted. I simply renamed "emacs-"
to "emacs-debug". Now I can inspect all the values.

reply via email to

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