Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: Multiple breakpoint locations
       [not found] <18233.63439.953202.586908@kahikatea.snap.net.nz>
@ 2007-11-17 11:55 ` Eli Zaretskii
  2007-11-17 13:55   ` Vladimir Prus
  2007-11-18  1:24   ` Nick Roberts
  0 siblings, 2 replies; 4+ messages in thread
From: Eli Zaretskii @ 2007-11-17 11:55 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb, gdb-patches

> From: Nick Roberts <nickrob@snap.net.nz>
> Date: Wed, 14 Nov 2007 08:15:27 +1300
> 
> 
> The new code for breakpoints with multiple locations looks very good and
> addresses a common complaint about GDB.  I have a couple of points and
> apologise if they have already been discussed.

Thanks for your suggestions, I fixed the manual as shown below:

2007-11-17  Eli Zaretskii  <eliz@gnu.org>

	* gdb.texinfo (Set Breaks, Disabling): Clarify behavior of
	breakpoints with multiple locations.
	(Breakpoint Menus): Improve wording.


Index: gdb/doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.444
diff -u -r1.444 gdb.texinfo
--- gdb/doc/gdb.texinfo	15 Nov 2007 18:43:23 -0000	1.444
+++ gdb/doc/gdb.texinfo	17 Nov 2007 11:48:53 -0000
@@ -2992,7 +2992,7 @@
 @item Enabled or Disabled
 Enabled breakpoints are marked with @samp{y}.  @samp{n} marks breakpoints
 that are not enabled.  An optional @samp{(p)} suffix marks pending
-breakpoints --- breakpoints for which address is either not yet
+breakpoints---breakpoints for which address is either not yet
 resolved, pending load of a shared library, or for which address was
 in a shared library that was since unloaded.  Such breakpoint won't
 fire until a shared library that has the symbol or line referred by
@@ -3001,7 +3001,7 @@
 Where the breakpoint is in your program, as a memory address.  For a
 pending breakpoint whose address is not yet known,  this field will
 contain @samp{<PENDING>}.  A breakpoint with several locations will
-have @samp{<MULTIPLE>} in this field --- see below for details.
+have @samp{<MULTIPLE>} in this field---see below for details.
 @item What
 Where the breakpoint is in the source for your program, as a file and
 line number.  For a pending breakpoint, the original string passed to
@@ -3060,16 +3060,16 @@
 In all those cases, @value{GDBN} will insert a breakpoint at all
 the relevant locations.
 
-A breakpoint with multiple locations is displayed in the
-breakpoint table using several rows --- one header row, followed
-by one row for each breakpoint location.  The header row
-has @samp{<MULTIPLE>} in the address column.  The rows for
-individual locations contain the actual addresses for locations,
-and say what functions those locations are in.  The number
-column for a location has number in the format
+A breakpoint with multiple locations is displayed in the breakpoint
+table using several rows---one header row, followed by one row for
+each breakpoint location.  The header row has @samp{<MULTIPLE>} in the
+address column.  The rows for individual locations contain the actual
+addresses for locations, and show the functions to which those
+locations belong.  The number column for a location is of the form
 @var{breakpoint-number}.@var{location-number}.
 
 For example:
+
 @smallexample
 Num     Type           Disp Enb  Address    What
 1       breakpoint     keep y    <MULTIPLE>
@@ -3081,11 +3081,17 @@
 
 Each location can be individually enabled or disabled by passing
 @var{breakpoint-number}.@var{location-number} as argument to the
-@code{enable} and @code{disable} commands.
+@code{enable} and @code{disable} commands.  Note that you cannot
+delete the individual locations from the list, you can only delete the
+entire list of locations that be long to their parent breakpoint (with
+the @kbd{delete @var{num}} command, where @var{num} is the number of
+the parent breakpoint, 1 in the above example).  Disabling or enabling
+the parent breakpoint (@pxref{Disabling}) affects all of the locations
+that belong to that breakpoint.
 
 @cindex pending breakpoints
 It's quite common to have a breakpoint inside a shared library.
-The shared library may be loaded and unloaded explicitly,
+Shared libraries can be loaded and unloaded explicitly,
 and possibly repeatedly, as the program is executed.  To support
 this use case, @value{GDBN} updates breakpoint locations whenever
 any shared library is loaded or unloaded.  Typically, you would
@@ -3093,7 +3099,7 @@
 debugging session, when the library is not loaded, and when the
 symbols from the library are not available.  When you try to set
 breakpoint, @value{GDBN} will ask you if you want to set
-a so called @dfn{pending breakpoint} --- breakpoint whose address
+a so called @dfn{pending breakpoint}---breakpoint whose address
 is not yet resolved.
 
 After the program is run, whenever a new shared library is loaded,
@@ -3544,6 +3550,9 @@
 @code{info watch} to print a list of breakpoints, watchpoints, and
 catchpoints if you do not know which numbers to use.
 
+Disabling and enabling a breakpoint that has multiple locations
+affects all of its locations.
+
 A breakpoint, watchpoint, or catchpoint can have any of four different
 states of enablement:
 
@@ -3808,8 +3817,8 @@
 to be defined several times, for application in different contexts.
 This is called @dfn{overloading}.  When a function name is overloaded,
 @samp{break @var{function}} is not enough to tell @value{GDBN} where you want
-a breakpoint.  If you realize this is a problem, you can use
-something like @samp{break @var{function}(@var{types})} to specify which
+a breakpoint.  You can use explicit signature of the function, as in
+@samp{break @var{function}(@var{types})}, to specify which
 particular version of the function you want.  Otherwise, @value{GDBN} offers
 you a menu of numbered choices for different possible breakpoints, and
 waits for your selection with the prompt @samp{>}.  The first two


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

* Re: Multiple breakpoint locations
  2007-11-17 11:55 ` Multiple breakpoint locations Eli Zaretskii
@ 2007-11-17 13:55   ` Vladimir Prus
  2007-11-17 15:35     ` Eli Zaretskii
  2007-11-18  1:24   ` Nick Roberts
  1 sibling, 1 reply; 4+ messages in thread
From: Vladimir Prus @ 2007-11-17 13:55 UTC (permalink / raw)
  To: gdb-patches

Eli Zaretskii wrote:

>> From: Nick Roberts <nickrob@snap.net.nz>
>> Date: Wed, 14 Nov 2007 08:15:27 +1300
>> 
>> 
>> The new code for breakpoints with multiple locations looks very good and
>> addresses a common complaint about GDB.  I have a couple of points and
>> apologise if they have already been discussed.
> 
> Thanks for your suggestions, I fixed the manual as shown below:
> 
> 2007-11-17  Eli Zaretskii  <eliz@gnu.org>
> 
> * gdb.texinfo (Set Breaks, Disabling): Clarify behavior of
> breakpoints with multiple locations.
> (Breakpoint Menus): Improve wording.
> 
> 
> Index: gdb/doc/gdb.texinfo
> ===================================================================
> RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
> retrieving revision 1.444
> diff -u -r1.444 gdb.texinfo
> --- gdb/doc/gdb.texinfo       15 Nov 2007 18:43:23 -0000      1.444
> +++ gdb/doc/gdb.texinfo       17 Nov 2007 11:48:53 -0000
> @@ -2992,7 +2992,7 @@
>  @item Enabled or Disabled
>  Enabled breakpoints are marked with @samp{y}.  @samp{n} marks breakpoints
>  that are not enabled.  An optional @samp{(p)} suffix marks pending
> -breakpoints --- breakpoints for which address is either not yet
> +breakpoints---breakpoints for which address is either not yet
>  resolved, pending load of a shared library, or for which address was
>  in a shared library that was since unloaded.  Such breakpoint won't
>  fire until a shared library that has the symbol or line referred by
> @@ -3001,7 +3001,7 @@
>  Where the breakpoint is in your program, as a memory address.  For a
>  pending breakpoint whose address is not yet known,  this field will
>  contain @samp{<PENDING>}.  A breakpoint with several locations will
> -have @samp{<MULTIPLE>} in this field --- see below for details.
> +have @samp{<MULTIPLE>} in this field---see below for details.
>  @item What
>  Where the breakpoint is in the source for your program, as a file and
>  line number.  For a pending breakpoint, the original string passed to
> @@ -3060,16 +3060,16 @@
>  In all those cases, @value{GDBN} will insert a breakpoint at all
>  the relevant locations.
>  
> -A breakpoint with multiple locations is displayed in the
> -breakpoint table using several rows --- one header row, followed
> -by one row for each breakpoint location.  The header row
> -has @samp{<MULTIPLE>} in the address column.  The rows for
> -individual locations contain the actual addresses for locations,
> -and say what functions those locations are in.  The number
> -column for a location has number in the format
> +A breakpoint with multiple locations is displayed in the breakpoint
> +table using several rows---one header row, followed by one row for
> +each breakpoint location.  The header row has @samp{<MULTIPLE>} in the
> +address column.  The rows for individual locations contain the actual
> +addresses for locations, and show the functions to which those
> +locations belong.  The number column for a location is of the form
>  @var{breakpoint-number}.@var{location-number}.
>  
>  For example:
> +
>  @smallexample
>  Num     Type           Disp Enb  Address    What
>  1       breakpoint     keep y    <MULTIPLE>
> @@ -3081,11 +3081,17 @@
>  
>  Each location can be individually enabled or disabled by passing
>  @var{breakpoint-number}.@var{location-number} as argument to the
> -@code{enable} and @code{disable} commands.
> +@code{enable} and @code{disable} commands.  Note that you cannot
> +delete the individual locations from the list, you can only delete the
> +entire list of locations that be long to their parent breakpoint (with

Was "be long" meant to be "belong"?

- Volodya



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

* Re: Multiple breakpoint locations
  2007-11-17 13:55   ` Vladimir Prus
@ 2007-11-17 15:35     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2007-11-17 15:35 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb-patches

> From:  Vladimir Prus <ghost@cs.msu.su>
> Date:  Sat, 17 Nov 2007 16:54:51 +0300
> 
> > +entire list of locations that be long to their parent breakpoint (with
> 
> Was "be long" meant to be "belong"?

Yes, of course (one of those typos a speller won't catch).  Thanks, I
fixed that now.


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

* Re: Multiple breakpoint locations
  2007-11-17 11:55 ` Multiple breakpoint locations Eli Zaretskii
  2007-11-17 13:55   ` Vladimir Prus
@ 2007-11-18  1:24   ` Nick Roberts
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Roberts @ 2007-11-18  1:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

 > Thanks for your suggestions, I fixed the manual as shown below:
 > 
 > 2007-11-17  Eli Zaretskii  <eliz@gnu.org>
 > 
 > 	* gdb.texinfo (Set Breaks, Disabling): Clarify behavior of
 > 	breakpoints with multiple locations.
 > 	(Breakpoint Menus): Improve wording.

Since the concept of a parent breakpoint has been used, perhaps this could
be used with "header row". Also breakpoint-number is abbreviated to BNUM
elsewhere.  Here are a few ideas:

-- 
Nick                                           http://www.inet.net.nz/~nickrob


*** gdb.texinfo.~1.446.~	2007-11-18 13:23:21.000000000 +1300
--- gdb.texinfo	2007-11-18 14:19:45.000000000 +1300
*************** In all those cases, @value{GDBN} will in
*** 3061,3072 ****
  the relevant locations.
  
  A breakpoint with multiple locations is displayed in the breakpoint
! table using several rows---one header row, followed by one row for
! each breakpoint location.  The header row has @samp{<MULTIPLE>} in the
! address column.  The rows for individual locations contain the actual
! addresses for locations, and show the functions to which those
! locations belong.  The number column for a location is of the form
! @var{breakpoint-number}.@var{location-number}.
  
  For example:
  
--- 3061,3074 ----
  the relevant locations.
  
  A breakpoint with multiple locations is displayed in the breakpoint
! table using several rows---one header row for the parent breakpoint,
! followed by one row for each breakpoint location.  The header row has
! @samp{<MULTIPLE>} in the address column.  The rows for individual
! locations contain the actual addresses for locations, and show the
! functions to which those locations belong.  The number column for a
! location is of the form @var{bnum}.@var{lnum} where @var{bnum} is is
! the number of the parent breakpoint and @var{lnum} the location
! number.
  
  For example:
  
*************** Num     Type           Disp Enb  Address
*** 3080,3093 ****
  @end smallexample
  
  Each location can be individually enabled or disabled by passing
! @var{breakpoint-number}.@var{location-number} as argument to the
! @code{enable} and @code{disable} commands.  Note that you cannot
! delete the individual locations from the list, you can only delete the
! entire list of locations that belong to their parent breakpoint (with
! the @kbd{delete @var{num}} command, where @var{num} is the number of
! the parent breakpoint, 1 in the above example).  Disabling or enabling
! the parent breakpoint (@pxref{Disabling}) affects all of the locations
! that belong to that breakpoint.
  
  @cindex pending breakpoints
  It's quite common to have a breakpoint inside a shared library.
--- 3082,3094 ----
  @end smallexample
  
  Each location can be individually enabled or disabled by passing
! @var{bnum}.@var{lnum} as argument to the @code{enable} and
! @code{disable} commands.  Note that you cannot delete the individual
! locations from the list, you can only delete the entire list of
! locations that belong to their parent breakpoint (with the @kbd{delete
! @var{bnum}} command, where @var{bnum} is 1 in the above example).
! Disabling or enabling the parent breakpoint (@pxref{Disabling})
! affects all of the locations that belong to that breakpoint.
  
  @cindex pending breakpoints
  It's quite common to have a breakpoint inside a shared library.


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

end of thread, other threads:[~2007-11-18  1:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <18233.63439.953202.586908@kahikatea.snap.net.nz>
2007-11-17 11:55 ` Multiple breakpoint locations Eli Zaretskii
2007-11-17 13:55   ` Vladimir Prus
2007-11-17 15:35     ` Eli Zaretskii
2007-11-18  1:24   ` Nick Roberts

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