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


I'm not sure what the problem is, then: the debug info already tells gdb
what source lines are executable. You have the line numbers associated with
each range of instructions, right?

In that case is the Right Thing(tm) to modify the listing code to elide
source lines that are not executable? I suppose this would be the CLI
equivalent of "graying out" the lines in a graphical debugger.

	-tre

-----Original Message-----
From: Stan Shebs [mailto:shebs@cygnus.com]
Sent: Thursday, July 08, 1999 3:39 PM
To: Tree@basistech.com
Cc: mrs@wrs.com; brendan@dgs.monash.edu.au; egcs@egcs.cygnus.com;
gdb@sourceware.cygnus.com
Subject: 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]