Re: [RFC] breakpoints and function prologues...

Jim Blandy
2002-07-31T20:47:38Z

For as long as I can remember, GDB has treated setting a breakpoint on
the line containing the opening curly brace of a function's block as
meaning `set a breakpoint before the prologue'. I've always assumed
that was deliberate behavior.

But I can't find it documented in the GDB manual. And it's a lousy
user interface (`break *main' works just as well, and makes more sense
to me). Maybe the behavior is just a side effect of the decision to
attribute the prologue code to the line containing the opening curly
brace --- if the program stops in the prologue, that's as sensible a
place as any to claim it's at.

So I'd support changing `break LINENO' to always skip the prologue.