This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC: -D definitions in executable ???
- To: brendan at dgs dot monash dot edu dot au, egcs at egcs dot cygnus dot com, gdb at sourceware dot cygnus dot com
- Subject: Re: GCC: -D definitions in executable ???
- From: mrs at wrs dot com (Mike Stump)
- Date: Thu, 8 Jul 1999 11:24:29 -0700
> Date: Thu, 08 Jul 1999 12:22:17 +1000
> From: Brendan Simon <brendan@dgs.monash.edu.au>
> With this type of feature, it would be possible for smart debuggers,
> such as gdb, to highlight code that was not conditionally compiled,
> in another color or even not be displayed. I'm thinking of debugger
> GUIs.
I think this is mostly possible now. All that one needs is a GUI and
to read a little source code and read the debugging information
already present.
For example, in
#if ...
...1
#else
...2
#endif
if there are any breakable lines in 1, then 2 was not compiled in...
In simpler cases,
#if ...
...1
#endif
We know that if a breakable lines exists in ...1, then the code was
compiled in. Likewise, as the size of ...1 increases and there are no
breakable lines, the probability that the code was compiled in
diminishes.