Re: [RFC] multiple breakpoints from FILE:LINE

Eli Zaretskii
2006-01-13T11:32:28Z

> From: Paul Hilfinger <hilfingr@gnat.com>
> Date: Fri, 13 Jan 2006 05:42:12 -0500 (EST)
>
> break FILENAME:LINENUM
>
> Normally, this refers to a single location in a program, but if this line
> is in the middle of a C++ template, a multiply #included file, or an
> Ada generic definition, it may refer to several locations. Currently,
> GDB chooses one of these silently.

Shouldn't it set breakpoints on ALL of those places instead?

> In Ada mode, AdaCore's GNAT Pro version of GDB will also present a menu in
> response to this latter case. In addition, we introduced a syntax
> (little used, I believe) for specifying a line in one specific generic
> instance:
>
> break FILENAME:FUNCTION:LINENUM
>
> where FUNCTION here would be fully qualified. That is, if P1 and P2
> are two different instantiations of a generic class defining F, then
>
> break something.adb:P2.F:12
>
> sets a breakpoint at line 12 in P2.F.

I'm not sure I understand: why isn't something.adb:12 enough to
specify the breakpoint location unambiguously?