How to configure GCC as debuggable

Phil Edwards phil@codesourcery.com
Fri Oct 15 00:54:00 GMT 2004


On Thu, Oct 14, 2004 at 03:04:42PM +0100, Dave Korn wrote:
> 
> CFLAGS='-g -O0' /path/to/configure <remaining configure options>

1) If your GDB is recent enough, building with -g3 lets you use
preprocessor macros inside the debugger as well.  Because in the GCC
source, Every. Single. Thing. has to be wrapped in macros, this becomes
terribly useful:

    (gdb) p TREE_WHATSIS(t)
    $42 = FOO_DECL
    (gdb)

2) Recent versions of configure like to have the environmental variable
assignments passed as arguments to the script, not pre-interpreted by
the shell.  They keep track of them for later comparisons.  (This is
mentioned in --help, I think.)

Phil


-- 
AI.cpp:33241: warning: You wrote 'neurons.merge(solution1, solution2)",
AI.cpp:33241: you probably MEANT "neurons->merge(solution1, solution2)",
AI.cpp:33241: but there is a MUCH better way to implement this whole
AI.cpp:33241: function; doing that instead.



More information about the Gcc mailing list