This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [RFC] multiple breakpoints from FILE:LINE
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Paul Hilfinger <hilfingr at gnat dot com>
- Cc: gdb at sourceware dot org
- Date: Fri, 13 Jan 2006 13:32:22 +0200
- Subject: Re: [RFC] multiple breakpoints from FILE:LINE
- References: <20060113104212.0B28848CBD8@nile.gnat.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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?