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: [RFC] Is skip_prologue_using_sal actually usable?


On Tue, Nov 09, 2004 at 02:53:20PM +0100, Mark Kettenis wrote:
>    Date: Mon, 8 Nov 2004 21:43:14 -0500
>    From: Daniel Jacobowitz <drow@false.org>
> 
>    If you want the first instruction that is not part of the prologue,
>    then you have no more reason to skip prologues at all.  My
>    understanding is that prologue skipping accomplishes two things:
> 
> B?   - Get the arguments into their save slots so that we can find
>        and display them.
> 
> A?   - Get the frame pointer into a sane state so we can backtrace.
> 
>    Well, we've taken care of (A) already - the new frame code requires
>    being able to backtrace from the first instruction of a function,
>    and we do it.  (I think we fall down more often in the epilogue than we
>    do in the prologue now.)
> 
> Assuming the second point is (A) and the first one is (B):

Oops -)  Yes, that's what I meant.

> Although it sounds plausible I think it's something we should revisit
> when GDB actually supports "locations" properly.
> 
> In the mean time, we really should strive for some consistency in
> where we put function breakpoints.  What do you think about my
> statement that too early is better than to late?

I don't think I agree.  We used to have a lot of problems with placing
breakpoints after branches; that, obviously, is too late (excepting the
PIC register setup).  But I find the inaccuracy of displayed function
arguments to be my single biggest day-to-day problem in using GDB. 
Just moments ago I wasted a couple minutes discovering that a pointer
hadn't been saved to the stack yet.

-- 
Daniel Jacobowitz


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