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

Joel Brobecker
2008-01-10T15:39:51Z

[I already conceded and moved to a revised proposal where the current
behavior is preserved, but this is an interesting question].

> 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.

Unfortunately, it's not always possible for the GUI to know that
the user clicked on a function name. The user actually clicked on
a line where a function happens to be defined. With GNAT, some
information is available for the GUI to use once the program has
been compiled, but not all languages provide that type of info.
This is why your suggestion would be relatively difficult to
implement in a way that would be "intelligent".

Right now, if you take GPS (AdaCore's GUI) as an example, if you
want to break on a function (using its name), you have to use
the contextual menu after right-clicking on the function name.
If you want to click on a specific line, just click on it.
Breaking on a function by name is therefore a little more effort
than breaking on a given line, which explains why most users
just click on line numbers.

--
Joel