This is the mail archive of the gdb-patches@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] breakpoints and function prologues...


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.


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