This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC: -D definitions in executable ???


> 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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]