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]
Other format: [Raw text]

Re: stabs at function entry point?



On Wednesday, March 13, 2002, at 06:18 PM, Richard Henderson wrote:

> On Wed, Mar 13, 2002 at 04:25:48PM -0800, Jim Ingham wrote:
>> So my contention was that no one who is doing source level debugging
>> ever wants to break at the beginning of the prologue.
>
> Which is patently false.  I do.  All the time.  It's almost
> impossible to avoid it when trying to debug optimized code.
>
>> All sorts of oddities happen then (the stack is wrong, the current
>> frame is wrong, etc) which from a source debugging point of view
>> are hard to understand.
>
> Yes indeed they are (though it would be greatly helped by using
> dwarf2 frame unwind info and location lists).  Nevertheless, if
> you've got optimized code, gdb's notion of what constitutes a
> prologue is worthless anyway.  So instead of "b foo; cond x == 1234"
> you have to do "b *foo; cond $a0 == 1234".

Yes, I do this too.  Which means I don't care what "b foo" does in
optimized code.  Indeed, I've found the debugging info put out with
optimization to be more confusing than helpful; to get anything done
I wind up debugging at assembly level anyway.

But the main point of the change was to get better behavior in
*unoptimized* code.  I suppose this point wasn't made very well
before.


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