This is the mail archive of the gdb@sourceware.org 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]
Other format: [Raw text]

Re: how to examine data with compiler optimization option set?


Frank Ch. Eigler wrote:

> On Thu, Sep 04, 2008 at 06:55:15PM +0300, Eli Zaretskii wrote:
> > [...]
> > > If parameters are passed in registers they are very likely to get lost.
> > 
> > Then the compiler should, under -ggdb, emit code and debug info that
> > allow GDB finding these parameters somewhere.
> 
> And it should.

Current GCC policy is that -g never changes anything in the emitted code.
If you build with and without -g and then strip the binaries, they are
supposed to be identical.  This seems a useful property to me ...

However, this is not to say there couldn't be some other option that
did change code generation like that.  (In any case, even without 
changing code generation, there seems to be a lot of possibilities
to simply generate better debug info describing what's there!)

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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