This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] multiple breakpoints from FILE:LINE


In response to

   break FUNCTION

in C++, GDB currently presents one with a list of choices when FUNCTION
is overloaded.  However, this is not the only case in which the target 
of a 'break' command is ambiguous.  Consider

   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.

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.

We would like to contribute some version of both of these to the public
sources.  Before doing so, however, we'd like to solicit comments.

Paul Hilfinger


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]