This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Should GCC tell GDB about its optimizations?
- To: Stan Shebs <shebs at apple dot com>
- Subject: Re: Should GCC tell GDB about its optimizations?
- From: "Brian R. Gaeke" <brg at sartre dot dgate dot ORG>
- Date: Fri, 3 Mar 2000 17:38:47 -0800
- Cc: gcc at gcc dot gnu dot org, gdb at sourceware dot cygnus dot com
- References: <38C051C3.260D666B@apple.com>
And then spake Stan Shebs, as follows:
> Ideally of course, GCC would issue lots of amazingly detailed debug info,
> and GDB would use it to reconstruct and report program state just as the
> programmer expects to see it. But today, the result is just lame; hackers
> trying to debug get lots of squirrelly behavior from GDB. The problem is
> that they don't know whether the randomness is due to bugs in the program,
> or to the effect of the optimizer. So the suggestion came up to have GCC
> issue debug info stating what optimizations have been applied to a file,
> and to have GDB report that information per-function, so that users could
> lower their expectations appropriately.
You may (or perhaps may not) find some of the material Caroline Tice has
worked on here at UCB useful -- ISTR she was investigating debugging
optimized code and did work on a compiler that outputted a lot of
information on the transformations that were applied to the code (and
debugging tools that used it.)
Disclaimer: I don't have any direct knowledge of how her code did what
it did, so I can't really be of much help -- but I just thought that
her dissertation talk sounded a lot like what you are trying to do...
http://sunsite.berkeley.edu/Dienst/UI/2.0/Describe/ncstrl.ucb/CSD-99-1077
http://www.cs.berkeley.edu/~cmtice/
-Brian
--
Brian R. Gaeke, brg@sartre.dgate.ORG -- PGP/GPG gleefully accepted
"the iguana / in the petshop window on St Catherine Street / crested,
royal-eyed, ruling / its kingdom of water-dish and sawdust / dreams of
sawdust" - Margaret Atwood, "Dreams of the Animals"