This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC: -D definitions in executable ???
- To: Tree at basistech dot com
- Subject: Re: GCC: -D definitions in executable ???
- From: Stan Shebs <shebs at cygnus dot com>
- Date: Thu, 8 Jul 1999 12:39:02 -0700
- CC: mrs at wrs dot com, brendan at dgs dot monash dot edu dot au, egcs at egcs dot cygnus dot com, gdb at sourceware dot cygnus dot com
From: Tom Emerson <Tree@basistech.com>
Date: Thu, 8 Jul 1999 15:16:56 -0400
You need to make the values of each of these macros available to the
editor/debugger so it can properly evaluate the expressions and determine
whether the contained code is live or not.
Perhaps for gdb dealing with these wouldn't be a big deal: determine where
the conditionals appear in the source file and match this against the
debugging information, "graying out" conditionals that are dead. But in a
syntax-aware editor doing this right is difficult.
Exactly right, we're depending on GDB's symbolic info for this. Doing
it with source code alone is pretty hard, because for instance some
GNU code gets the values of macros from shell scripts that run at
configure time, so you couldn't know how to highlight until configure
had been run. But with an executable, you can use line info to get
exact knowledge about which pieces of code were compiled in (but not
declarations, unless debugging info were to be expanded somehow).
Stan