From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by sourceware.org (Postfix) with ESMTPS id B67823858D33 for ; Tue, 31 May 2022 11:31:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B67823858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f51.google.com with SMTP id q7so7303022wrg.5 for ; Tue, 31 May 2022 04:31:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=xkT7IoxAGR2NpqgfbJUGm4nSdCcThbfhyOnP4xs6EIg=; b=BnkRHbQL9IBuiE8WffrtOrlCOhPX0clIlNLB2Mo3fq7mx9IReqLmSC1SW1GuwzNJee U7ScxAMD3qShddwCjd3X34iL6tEqKUwky2vlU3dyXDPKEb8RkV4YoBRxR6ftikXc2cMD EDIUTEMh2Cb1WSnABJGoYlWEqOaKkqm9TbTWvm8OJb2lDSOse6dfpsDc7cxVMy+Kq6Pb ti+4Q+ZRAH1wzYInKxAvQ+MPdSp1aVdwQRFcf8g86aXmZIxVLB1VlVYerYtZh17N3TrS fQgthGzP5O8pKBmGRwF890QXEiXnYku1eXwHuKLKny7Oby7i1O+tU6fz+qDltUbTNcbA YYwg== X-Gm-Message-State: AOAM53299Ec4WxeV10TGFKN82l7Z7ttnWIeDS9X3p64bPr8wN4J4D+gB qOcXclT19TyGwCuXput46doBrXMmNkk= X-Google-Smtp-Source: ABdhPJzkbTqt2pQoeKtsm1Cp4BkkpRHXZR/n4VlFKS1OvxwdsMwWpsH0NrC+v+cyaolTxgSRw60nBg== X-Received: by 2002:adf:d1e9:0:b0:20f:d6b4:56a9 with SMTP id g9-20020adfd1e9000000b0020fd6b456a9mr36213591wrd.169.1653996702632; Tue, 31 May 2022 04:31:42 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id n6-20020a05600c4f8600b0039b006bd6d9sm2252462wmq.6.2022.05.31.04.31.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 May 2022 04:31:41 -0700 (PDT) Message-ID: Date: Tue, 31 May 2022 12:31:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: [PATCH] Improve break-range's documentation Content-Language: en-US To: Eli Zaretskii Cc: gdb-patches@sourceware.org References: <20220526194250.2310460-1-pedro@palves.net> <838rqmm7gb.fsf@gnu.org> <6914f754-4e33-5aa1-4ea6-dca9504e8bfe@palves.net> <837d63j8tx.fsf@gnu.org> From: Pedro Alves In-Reply-To: <837d63j8tx.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2022 11:31:45 -0000 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 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