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

Re: Variable "foo" is not available


> Date: Sat, 2 Apr 2005 13:40:23 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb@sources.redhat.com, Reiner.Steib@gmx.de
> 
> > 9 different functions were reported with such arguments.  IMHO, that's
> > too many for a rare situation.
> 
> I didn't say it was a rare situation.

If it isn't rare, we should do something about it, I think.

> It's easy to not notice the problem with earlier versions of GCC.

I'm using GCC 3.x since the year 2001, and the DWARF 2 debug info as
the default since more than a year ago.  I think this is long enough
not to dismiss my experience.

Anyway, I don't really understand what is your intent.  Are you saying
that this is what we should expect from optimized code in GDB, and
that nothing should or could be done about it?

> On non-DWARF targets or old versions, the variables will appear to
> be available - even if their correct values no longer exist in
> memory.

We are talking about function call arguments here, not just about any
local variables.  Can you tell what compiler optimizations could cause
what Reiner reported: that the first argument is available to GDB, but
the second is not?


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