Macro and Define

Daniel Berlin dan@cgsoftware.com
Mon Aug 14 18:54:00 GMT 2000


On Mon, 14 Aug 2000, Stan Shebs wrote:

> Fabrice Gautier wrote:
> > 
> > Hi,
> > 
> > I thought that DWARF2 debug format contained debug information about
> > preprocessor #defines. But I,m unable to know the value of some macros in
> > the debugger.
> 
> Dwarf2 has a specification for how to record macros, but alas, GCC
> does not include those in its output, nor does GDB have the machinery
> to run a preprocessor over an expression before evaluating it.
> 
> Stan
> 


1. GCC plans to include this info soon, the hooks exist, they just do
nothing right now.
2. GDB wouldn't need to run a preprocessor over an expression before
evaluating it.
You could simply determine that the name given is a macro symbol, and do
the right thing, since the macro info given in dwarf2 contains all the
info you need.
--Dan



More information about the Gdb mailing list