: Re: [RFC] multiple breakpoints from FILE:LINE

Robert Dewar dewar@adacore.com
Sun Jan 15 17:38:00 GMT 2006


>
> >>> Those menus have got to go.  They're (a) confusing to users (in
> >>> my opinion, no real data), and (b) extremely awkward for
> >>> graphical frontends....
>
> Cyrille> I agree with Daniel's (a) & (b). I have never grumbled
> Cyrille> before on this topic because I did not have anything
> Cyrille> constructive to contribute. This thread gave me an
> Cyrille> idea. Here it is:
>  
>
I strongly object to removing the menus which are very convenient to
use. No proposal here comes close to being as convenient. For the
overriding case, here is typical usage:

(gdb) pn (parent (1666))
Multiple matches for parent
[0] cancel
[1] atree.parent at /M/gnat5/src/gcc/ada/atree.adb:2104
[2] nlists.parent at /M/gnat5/src/gcc/ada/nlists.adb:1020
 > 1
N_Assignment_Statement (Node_Id=1665) (source)
 Sloc = 9928  a.adb:4:6
 Name = N_Identifier "x" (Node_Id=1662)
 Expression = N_Op_Divide "Odivide" (Node_Id=1666)

Certainly you want the menu in that case I would
assume (I can't see an alternative).

So if I do

(gdb) break parent
[0] cancel
[1] all
[2] atree.parent at /M/gnat5/src/gcc/ada/atree.adb:2104
[3] nlists.parent at /M/gnat5/src/gcc/ada/nlists.adb:1020
 > 2
Breakpoint 6 at 0x43e755: file c:/M/gnat5/src/gcc/ada/atree.adb, line 2104.

again, typing 2/return is very simple, I certainly don't want to have to go
looking up where parent is declared and typing its line number in the
first place, and copying and pasting a command is far slower than typing
2/return.

In the GUI case I have to click on an alternative either way, so what's

Note that indeed it is the case that it is important (crucial I
would say) to be able to place a breakpoint on only one occurrence.


the difference?

> Cyrille> I believe it would be worthwhile to have 2 different break
> Cyrille> commands: - break - break-multiple (or whatever other more
> Cyrille> appropriate name)
>
> Cyrille> break-multiple would have the semantics advocated by Daniel
> Cyrille> (break automatically on all relevant locations)
>
> Cyrille> break, instead of presenting a menu, would issue an error of
> Cyrille> the kind:
>
> Cyrille> (gdb) break FILENAME:LINENUM multiple choices for this
> Cyrille> breakpoint, please use any of the following: break-multiple
> Cyrille> FILENAME:LINENUM break FILENAME:instance1.function:LINENUM
>
>Nice.  What syntax would you use for the two constructors, and three
>destructors, that have the same C++ names?
>
>  
>
Does not look nice at all to me, it is far more work to cut and paste a 
break
command than to type one digit.





More information about the Gdb mailing list