This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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 ???



   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


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