Re: [RFC/RFA/i386] pb reading insns if breakpoints still inserted

Jim Blandy
2006-04-28T21:42:31Z

On 4/28/06, Daniel Jacobowitz <drow@false.org> wrote:
> On Fri, Apr 28, 2006 at 11:09:19PM +0200, Mark Kettenis wrote:
> > But if we don't have debug information, what's the point in trying to
> > skip the prologue in order to put a breakpoint on ... eh what exactly?
> > Isn't it better to just punt prologue skipping in that case and place
> > the breakpoint on the first instruction of the code?
>
> Yes, I agree.

So you guys would like to push the deprecation boundary further the
other way, and deprecate SKIP_PROLOGUE itself? That's an idea.

> I'd like to note, though, that the way we skip prologues based on debug
> information is completely wrong. It only works with GCC and with other
> compilers that have chosen to be bug-compatible with GCC. DWARF does
> support a "this is the end of the prologue" flag, but I don't know if
> GCC emits it, and I'm pretty positive GDB doesn't know how to consume
> it.

I think the argument was that, in the long run, GCC should be emitting
location lists so that the debugging information accurately describes
the location of the arguments even within the prologues. Setting a
breakpoint on a function would actually set the breakpoint ... at the
function's entry point. We could delete SKIP_PROLOGUE altogether.
Then, there'd be no point in producing or consuming an "end of
prologue" marker whose meaning is kind of vague anyway.