[PATCH] i386_skip_prologue.

Daniel Jacobowitz drow@false.org
Sat Dec 30 21:31:00 GMT 2006


On Sat, Dec 30, 2006 at 10:20:52PM +0100, Mark Kettenis wrote:
> I'm sorry.  I tend to suffer from packet loss at my side.

No problem - that's what I'm here for :-)

> > Is there a general philosophy we could adopt that would apply to most
> > or all targets?
> > 
> > Here's a proposal to get us started: when skipping the prologue to
> > place a breakpoint or finish single stepping (skip_prologue), try to
> > skip to the end of the first sal.  But some targets may optionally run
> > their prologue analyzer and make sure it doesn't see anything it
> > objects to - like jumps.  That would mean the i386 prologue analyzer
> > would need to know about this new call to __main.  When scanning the
> > prologue to build frame unwind information, ignore sals entirely.
> > Scan until we hit the saved PC or until we believe we understand
> > the entire frame.
> 
> The last time I tried using sals on i386, I simply encountered too
> many cases where the line number information couldn't be trusted and
> putting a breakpoint on a function that was defenitely called never
> hit.

Yeah.  That's definitely the biggest risk.

I think the first step, for Pedro's specific problem, should be
to recognize the call to __main as special and skippable.  We can
play with sals later.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list