Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* : Re: [RFC] multiple breakpoints from FILE:LINE
@ 2006-01-15  1:51 Cyrille Comar
  2006-01-15 16:33 ` Paul Koning
  2006-01-15 22:23 ` Paul Hilfinger
  0 siblings, 2 replies; 31+ messages in thread
From: Cyrille Comar @ 2006-01-15  1:51 UTC (permalink / raw)
  To: Paul Hilfinger; +Cc: gdb

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

 > Interesting.  As I said, in Ada, the multi-line feature is much more
 > important than in C.  AdaCore's version has been around for years, and
 > has simply created multiple breakpoints (controlled by menu, as for
 > overloading).  We haven't gotten loud calls for doing things
 > differently (well, point (b) has caused internal gripes), but perhaps
 > I should do some polling for soft grumbling from users.

Ok, here is some soft grumblings from a long-standing internal user of 
the AdaCore version: grumble grumble...
;-)

I agree with Daniel's (a) & (b). I have never grumbled before on this 
topic because I did not have anything constructive to contribute. This 
thread gave me an idea. Here it is:

I believe it would be worthwhile to have 2 different break commands:
     - break
     - break-multiple (or whatever other more appropriate name)

break-multiple would have the semantics advocated by Daniel (break 
automatically on all relevant locations)

break, instead of presenting a menu, would issue an error of the kind:

(gdb) break FILENAME:LINENUM
multiple choices for this breakpoint, please use any of the following:
break-multiple FILENAME:LINENUM
break FILENAME:instance1.function:LINENUM
break FILENAME:instance2.function:LINENUM
break FILENAME:instance3.function:LINENUM


That solves 4 issues:
   - an experienced user can do exactly what she wants
   - a less experienced user can copy/paste the appropriate choice from 
the error message
   - there is no more awkward interactive menu in text mode
   - a graphical interface can easily parse the error output and do 
whatever deemed appropriate in the interface (presenting a menu for 
instance)


^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: [RFC] multiple breakpoints from FILE:LINE
@ 2006-01-15 17:38 David Anderson
  2006-01-15 17:50 ` Daniel Jacobowitz
  2006-01-15 17:54 ` Robert Dewar
  0 siblings, 2 replies; 31+ messages in thread
From: David Anderson @ 2006-01-15 17:38 UTC (permalink / raw)
  To: gdb

The  multiple breakpoints due-to-inlining discussion has
mentioned 20 or 21 breakpoints.

What if there are 200 or  2000 or 20000 or more inlining sites
of one function?

A breakpoint listing won't be very usable either, whether of
2000 entries or one entry with 2000 break addresses. Will it?

[Sorry, no proposal here. Just raising the issue.]
David Anderson


^ permalink raw reply	[flat|nested] 31+ messages in thread
* [RFC] multiple breakpoints from FILE:LINE
@ 2006-01-13 10:42 Paul Hilfinger
  2006-01-13 11:32 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Paul Hilfinger @ 2006-01-13 10:42 UTC (permalink / raw)
  To: gdb


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


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2006-01-16 15:31 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-15  1:51 : Re: [RFC] multiple breakpoints from FILE:LINE Cyrille Comar
2006-01-15 16:33 ` Paul Koning
2006-01-15 16:45   ` Daniel Jacobowitz
2006-01-15 17:41     ` Robert Dewar
2006-01-15 22:23       ` Paul Koning
2006-01-16 13:43     ` Cyrille Comar
2006-01-16 13:47       ` Daniel Jacobowitz
2006-01-16 14:16         ` Cyrille Comar
2006-01-16 15:31       ` Paul Koning
2006-01-15 17:38   ` Robert Dewar
2006-01-16  6:58     ` Jim Blandy
2006-01-16 10:03       ` Robert Dewar
2006-01-16 10:04       ` Robert Dewar
2006-01-15 22:23 ` Paul Hilfinger
  -- strict thread matches above, loose matches on Subject: below --
2006-01-15 17:38 David Anderson
2006-01-15 17:50 ` Daniel Jacobowitz
2006-01-15 17:54 ` Robert Dewar
2006-01-15 18:33   ` Andreas Schwab
2006-01-15 19:06     ` Robert Dewar
2006-01-13 10:42 Paul Hilfinger
2006-01-13 11:32 ` Eli Zaretskii
2006-01-13 11:56   ` Joel Brobecker
2006-01-13 13:05     ` Eli Zaretskii
2006-01-13 14:17       ` Andrew STUBBS
2006-01-13 15:27         ` Daniel Jacobowitz
2006-01-13 15:25   ` Daniel Jacobowitz
2006-01-13 15:19 ` Paul Koning
2006-01-13 15:23 ` Daniel Jacobowitz
2006-01-13 15:40   ` Joel Brobecker
2006-01-14 10:15   ` Paul Hilfinger
2006-01-14 16:16     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox