[PATCHv2,02/13] gdb/doc: extend the documentation for conditional breakpoints

Message ID 93c3968f10fcc7e2c85e1dae3cbbf1bcf122ea44.1674058359.git.aburgess@redhat.com
State New
Headers
Series Infcalls from B/P conditions in multi-threaded inferiors |

Commit Message

Andrew Burgess Jan. 18, 2023, 4:17 p.m. UTC
  This documentation update adds more text to describe what happens if a
conditional breakpoint calls an inferior function, and the inferior
function is interrupted for some reason.
---
 gdb/doc/gdb.texinfo | 11 +++++++++++
 1 file changed, 11 insertions(+)
  

Comments

Eli Zaretskii Jan. 18, 2023, 5:22 p.m. UTC | #1
> Cc: Andrew Burgess <aburgess@redhat.com>
> Date: Wed, 18 Jan 2023 16:17:58 +0000
> From: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
> 
> This documentation update adds more text to describe what happens if a
> conditional breakpoint calls an inferior function, and the inferior
> function is interrupted for some reason.
> ---
>  gdb/doc/gdb.texinfo | 11 +++++++++++
>  1 file changed, 11 insertions(+)

This is okay, thanks.
  
Terekhov, Mikhail via Gdb-patches Jan. 19, 2023, 9:04 a.m. UTC | #2
On Wednesday, January 18, 2023 5:18 PM, Andrew Burgess wrote:
> This documentation update adds more text to describe what happens if a
> conditional breakpoint calls an inferior function, and the inferior
> function is interrupted for some reason.
> ---
>  gdb/doc/gdb.texinfo | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index e05813ff502..6ea173b5d0b 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -5713,6 +5713,17 @@
>  purpose of performing side effects when a breakpoint is reached
>  (@pxref{Break Commands, ,Breakpoint Command Lists}).
> 
> +If a breakpoint condition calls a function in your program, then it is
> +possible that your program could stop for some reason while in the
> +called function.  For example, @value{GDBN} might hit a breakpoint in
> +the called function, or the called function may receive a signal
> +(e.g.@ a @code{SIGSEGV}) as a result of some undefined behaviour, if

It seems to me like this could be "... behaviour. If ...".

Regards
-Baris


Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
  
Eli Zaretskii Jan. 19, 2023, 10:07 a.m. UTC | #3
> Date: Thu, 19 Jan 2023 09:04:03 +0000
> From: "Aktemur, Tankut Baris via Gdb-patches" <gdb-patches@sourceware.org>
> 
> > +If a breakpoint condition calls a function in your program, then it is
> > +possible that your program could stop for some reason while in the
> > +called function.  For example, @value{GDBN} might hit a breakpoint in
> > +the called function, or the called function may receive a signal
> > +(e.g.@ a @code{SIGSEGV}) as a result of some undefined behaviour, if
> 
> It seems to me like this could be "... behaviour. If ...".

And in any case it should be "behavior", as we use US English
spelling.
  

Patch

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index e05813ff502..6ea173b5d0b 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -5713,6 +5713,17 @@ 
 purpose of performing side effects when a breakpoint is reached
 (@pxref{Break Commands, ,Breakpoint Command Lists}).
 
+If a breakpoint condition calls a function in your program, then it is
+possible that your program could stop for some reason while in the
+called function.  For example, @value{GDBN} might hit a breakpoint in
+the called function, or the called function may receive a signal
+(e.g.@ a @code{SIGSEGV}) as a result of some undefined behaviour, if
+this happens then @value{GDBN} will stop.  Depending on the settings
+@code{unwindonsignal} and @code{unwind-on-terminating-exception}
+(@pxref{Calling,,Calling Program Functions}) @value{GDBN} may unwind
+the stack back to the breakpoint location, or may leave the program at
+the frame where the stop occurred.
+
 Breakpoint conditions can also be evaluated on the target's side if
 the target supports it.  Instead of evaluating the conditions locally,
 @value{GDBN} encodes the expression into an agent expression