This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: GCC: -D definitions in executable ???
- To: mrs@wrs.com
- Subject: Re: GCC: -D definitions in executable ???
- From: Stan Shebs <shebs@cygnus.com>
- Date: Thu, 8 Jul 1999 12:10:54 -0700
- CC: brendan@dgs.monash.edu.au, egcs@egcs.cygnus.com, gdb@sourceware.cygnus.com
Date: Thu, 8 Jul 1999 11:24:29 -0700
From: mrs@wrs.com (Mike Stump)
> 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.
In fact both Insight and the old gdbtk sources include the algorithm
to pick out and identify the breakable lines. Identifying the
conditionals is a little more trouble, since GDB normally doesn't try
to interpret the contents of source lines, just passes them through
when doing listings and such. However, you wouldn't need a full
preprocessor, just need to identify the #if/#ifdef/#else/#endif lines.
I don't think any compiler work would be necessary.
If someone were to write this, I would certainly be pleased to add it
into GDB.
Stan