Re: [RFC/RFA?] Should break FILE:LINENO skip prologue?

Jim Blandy
2008-01-10T17:15:48Z

Michael Snyder <msnyder at specifix.com> writes:
> By habit and actual practice, if I tell gdb to set a breakpoint
> at the opening brace of a function, it is because I want it to
> stop before the prologue.

My feeling is that this usage is not important to support, as it makes
things confusing for most GUI users, and GDB provides another way to
set a breakpoint at a function's exact entry point.

> If I tell gdb to set a breakpoint AFTER local variable x
> is initialized, but BEFORE local variable y is initialized,
> as in the following example...
>
> int foo()
> {
> int x = 12;
> char *y = "bar";
>
> it is because I want gdb to stop after x is initialized
> and before y is initialized.
> If gdb decided not to LET me stop in the middle of the
> prologue, I would be exceedingly pissed off.

Prologue skipping doesn't affect this, as those initializations are
not considered part of the prologue. 'break foo', which skips the
prologue, will set the breakpoint before the initialization of 'x'.
Have I misunderstood?