This is the mail archive of the
mailing list for the GDB project.
Re: [RFC/RFA?] Should break FILE:LINENO skip prologue?
On Thu, Jan 10, 2008 at 11:38:29AM +0100, Mark Kettenis wrote:
> I get hopelessly frustrated with tools that restrict me from doing
> things. I have no problem with the skipping the prologue if I place
> the breakpoint on a function because there is an easy to use way to
> put a breakpoint on the first instruction of a function. But there is
> no easy to use alternative for placing a breakpoint on a certain line
> "within" the prologue like the case Michael sketched.
I don't like my tools to restrict me, either, but I think this is a
change rather than a restriction. There are no lines within the
prologue (clicking on local variables as Michael described will stop
after the prologue and any earlier local variables, at least at -O0
and with gcc). And Eclipse, the only IDE with which I am personally
familiar, lets you type breakpoint expressions. So you can type
"*function_name" into the breakpoint expression box, and you'll stop
in front of the prologue.
What do you think - is that good enough?
> IMHO adding knobs is not desirable, but if the default is to keep the
> current behaviour, I won't object.
I also would prefer not to add a knob for this. I don't like knobs
for things that (IMHO) we should simply decide consistently.
Although, if the consensus is to keep the current behavior, at least
an IDE could set the knob automatically (unconditionally). Then the
user experience will be a little different between a GDB console
presented by Eclipse versus a true GDB console (unfortunate), but the
GUI experience will be more intuitive (fortunate).