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

Mark Kettenis
2008-01-10T10:39:16Z

> Date: Wed, 9 Jan 2008 20:15:40 -0800
> From: Joel Brobecker <brobecker@adacore.com>
>
> > What about with a gui? The gui way of doing this
> > would be to click on the line with the opening curly-brace.
>
> Interestingly, the GUI is what started everything on our side.
> Average users using a GUI who wanted to break on a function simply
> clicked on the line where the function name was located, and
> expected things to just work. A question that I asked myself was:
> Why does "break FUNCTION_NAME" skip the prologue and yet "break
> FILE:LINENO" (from clicking on the filename) doesn't?

Ah, that puts things in a slightly different perspective. One could
argue that the problem here isn't in GDB, but in the GUI which really
should respond to the user clicking the function name with setting a
breakpoint on the function instead of putting the breakpoint on a
line.

> > Sure, I appreciate that -- just speaking up for the other viewpoint.
>
> I understand. I am not denying that the other viewpoint will be negatively
> impacted, this is not what I was saying. Is the positive influence on
> the other side large enough that the change is worth it? The question
> is open. But I think that the fact that Apple made this change, and
> that AdaCore also proposed it independently of Apple, shows that the
> usage among users of both companies is more in favor of skipping the
> prologue.

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.

> But if you think that the benefit is not large enough to warrant
> the change, then I think that's good feedback, and I'll introduce
> a switch and keep the current behavior as the default. I actually
> really believe that skipping the prologue is the most useful way
> of doing things, but I don't want to sound like I'm pushing hard
> for it. I'm happy if we have a switch - just sad that the other
> side of the camp doesn't see the light (yet :-P) :-).

IMHO adding knobs is not desirable, but if the default is to keep the
current behaviour, I won't object.