This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: GCC: -D definitions in executable ???
- To: brendan@dgs.monash.edu.au, egcs@egcs.cygnus.com, gdb@sourceware.cygnus.com
- Subject: Re: GCC: -D definitions in executable ???
- From: mrs@wrs.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.