[RFC/RFA?] Should break FILE:LINENO skip prologue?
Joel Brobecker
brobecker@adacore.com
Sat Jan 12 14:30:00 GMT 2008
> In that case, I think we will need an appropriate change for the
> manual as well, as right now, "break *my_procedure" and "break 2" are
> equivalent (at least AFAIK).
I agree and that was in my plans (I believe that any change of behavior
deserves an associated documentation update). I am also planning on
adding a NEWS entry as well.
> `break FUNCTION'
> Set a breakpoint at entry to function FUNCTION. When using source
> languages that permit overloading of symbols, such as C++,
> FUNCTION may refer to more than one possible place to break.
> *Note Breakpoint Menus: Breakpoint Menus, for a discussion of that
> situation.
>
> This doesn't say anything about function prologs.
>
> `break *ADDRESS'
> Set a breakpoint at address ADDRESS. You can use this to set
> breakpoints in parts of your program which do not have debugging
> information or source files.
>
> This doesn't say anything about the possible distinction between
> *my_procedure as the address and 2 as its source line number.
I think that this is because function prologues are, in the typical
users view, an implementation detail. It's not a concept of the
language, it's more an ABI-related concept. Dare I say that a lot
of engineers nowdays don't know what an ABI is?... (I'll admit that
I learnt about this after I completed my training)
I don't know exactly how to document this behavior change yet, but
I think we need to be careful not to confuse the average joe-hacker
by being too technical too soon.
--
Joel
More information about the Gdb-patches
mailing list