public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: [PATCH] Improve break-range's documentation
Date: Tue, 31 May 2022 12:31:40 +0100	[thread overview]
Message-ID: <aa030bd8-374c-67ae-923f-144b2e6b278f@palves.net> (raw)
In-Reply-To: <837d63j8tx.fsf@gnu.org>

On 2022-05-30 17:15, Eli Zaretskii wrote:
>>>> +@item break-range @var{start-locspec}, @var{end-locspec}
>>>> +Set a breakpoint for an address range given by @var{start-locspec} and
>>>> +@var{end-locspec}, which are location specs.  @xref{Location
>>>> +Specifications}, for a list of all the possible forms of location
>>>> +specs.  If either @var{start-locspec} or @var{end-locspec} resolve to
>>>> +multiple addresses in the program, then the command aborts with an
>>>> +error without creating a breakpoint.  The breakpoint will stop
>>>> +execution of the inferior whenever it executes an instruction at any
>>>> +address within the specified range, including @var{start-locspec} and
>>>> +@var{end-locspec}.
>>> This deviates from the usual practice elsewhere, and talks about
>>> location specs resolving into _addresses_ and not code locations.  is
>>> that intentional and necessary?
>> Yes, it is intentional here, because the command is exactly about breaking
>> on any address that falls within an address range.
> Then I think this needs some additional text explaining that, or
> qualifying the "location resolves to address" part.

How about this:

From 40c64ac6d4d7d6caef7156ceb31387b343eef324 Mon Sep 17 00:00:00 2001
From: Pedro Alves <pedro@palves.net>
Date: Tue, 31 May 2022 12:18:49 +0100
Subject: [PATCH] Improve break-range's documentation

Change-Id: Iac26e1d2e7d8dc8a7d9516e6bdcc5c3fc4af45c8
---
 gdb/doc/gdb.texinfo | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 7886f3eb3dd..c2fb78f933f 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -25496,7 +25496,7 @@ about the @code{mask} argument in @ref{Set Watchpoints}.
 PowerPC embedded processors support hardware accelerated
 @dfn{ranged breakpoints}.  A ranged breakpoint stops execution of
 the inferior whenever it executes an instruction at any address within
-the range it specifies.  To set a ranged breakpoint in @value{GDBN},
+the range it was set at.  To set a ranged breakpoint in @value{GDBN},
 use the @code{break-range} command.
 
 @value{GDBN} provides the following PowerPC-specific commands:
@@ -25507,12 +25507,14 @@ use the @code{break-range} command.
 Set a breakpoint for an address range given by @var{start-locspec} and
 @var{end-locspec}, which are location specs.  @xref{Location
 Specifications}, for a list of all the possible forms of location
-specs.  If either @var{start-locspec} or @var{end-locspec} resolve to
-multiple addresses in the program, then the command aborts with an
-error without creating a breakpoint.  The breakpoint will stop
-execution of the inferior whenever it executes an instruction at any
-address within the specified range, including @var{start-locspec} and
-@var{end-locspec}.
+specs.  @value{GDBN} resolves both @var{start-locspec} and
+@var{end-locspec}, and uses the addresses of the resolved code
+locations as start and end addresses of the range to break at.  If
+either @var{start-locspec} or @var{end-locspec} resolve to multiple
+code locations in the program, then the command aborts with an error
+without creating a breakpoint.  The breakpoint will stop execution of
+the inferior whenever it executes an instruction at any address
+between the start and end addresses, inclusive.
 
 @kindex set powerpc
 @item set powerpc soft-float

-- 
2.36.0


  parent reply	other threads:[~2022-05-31 11:31 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 19:42 [PATCH v4] gdb/manual: Introduce location specs Pedro Alves
2022-05-27 14:16 ` Eli Zaretskii
2022-05-27 15:04   ` Pedro Alves
2022-05-27 15:52     ` Eli Zaretskii
2022-05-27 17:11       ` Pedro Alves
2022-05-27 17:31         ` Eli Zaretskii
2022-05-27 17:51           ` Pedro Alves
2022-05-27 18:23             ` Eli Zaretskii
2022-05-27 18:42               ` Pedro Alves
2022-05-27 18:50                 ` Pedro Alves
2022-05-27 19:00                   ` Eli Zaretskii
2022-05-27 19:30                     ` Pedro Alves
2022-05-28  7:43                       ` Eli Zaretskii
2022-05-30 14:38                         ` Pedro Alves
2022-05-27 18:55                 ` Eli Zaretskii
2022-05-27 19:05                   ` Pedro Alves
2022-05-27 19:14                     ` Eli Zaretskii
2022-05-27 19:17                       ` Pedro Alves
2022-05-27 19:34                         ` Eli Zaretskii
2022-05-27 19:38                           ` Pedro Alves
2022-05-28  7:39 ` Eli Zaretskii
2022-05-30 14:44   ` [pushed v5] " Pedro Alves
2022-05-30 16:15     ` Eli Zaretskii
2022-05-31 11:05       ` [PATCH] Improve clear command's documentation Pedro Alves
2022-05-31 12:36         ` Eli Zaretskii
2022-05-31 13:04           ` Pedro Alves
2022-05-31 13:42             ` Eli Zaretskii
2022-05-31 14:47               ` Pedro Alves
2022-05-31 16:06                 ` Eli Zaretskii
2022-05-31 11:13       ` [PATCH] Explicitly mention yet-unloaded shared libraries in location spec examples Pedro Alves
2022-05-31 11:47         ` Eli Zaretskii
2022-05-31 11:17       ` [pushed v5] gdb/manual: Introduce location specs Pedro Alves
2022-05-31 11:31       ` Pedro Alves [this message]
2022-05-31 11:55         ` [PATCH] Improve break-range's documentation Eli Zaretskii
2022-05-31 12:03           ` Pedro Alves
2022-05-31 12:09             ` Eli Zaretskii
2022-06-01 17:17     ` RTe: Location Specs (Was: [pushed v5] gdb/manual: Introduce location specs) Eli Zaretskii
2022-06-02 11:10       ` Pedro Alves
2022-06-02 11:49         ` Eli Zaretskii
2022-06-02 12:40           ` Pedro Alves
2022-06-02 12:56             ` Eli Zaretskii
2022-06-02 13:44               ` Pedro Alves
2022-06-02 16:37                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aa030bd8-374c-67ae-923f-144b2e6b278f@palves.net \
    --to=pedro@palves.net \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).