From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by sourceware.org (Postfix) with ESMTPS id BF10F386F45A for ; Wed, 22 Jul 2020 13:56:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BF10F386F45A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wm1-f65.google.com with SMTP id f18so2097975wml.3 for ; Wed, 22 Jul 2020 06:56:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1BwxfPy948ryko2o5et5uVIQITFw0+pzEiVLISbsqMY=; b=M1lrFjOkjFGN1wdCF63EqKHTP7rRYPDHJBxYA4QxGOyDlwofKNmBL2l+E7+qYXSHmE GYhx8hAnYjXlH2QxVIIq5G70wUTB3mM27eXcrD+h8Mv8LsoFRtZ2lB0Yw3W1t89x16dX qJtE0tOtPlpREAtlaloXrl+of6mg+YxHuHT9Z/PjDDcBUBUopD+FAYVqOMLVhLETHZEb WuxO2Z5MHm+g00ofgAgQERBx8wH4nfNWjj0wkU1STIspL0SdQPSMekZe+J4DhR2lOswf Dd8mehrdrii/UUG0a535Beq1jkh5G5TQbtvL+qGDjniJDy/E9D0ubGE4Y6XT//LEhu4o E1Hg== X-Gm-Message-State: AOAM532T4V1WxdbCa460XNAF+vVp1qPy0THGaR7AmkZzQvlTEa9/cUrF JfX4upQ8yISqE1WYppZTftcx4FvQazM= X-Google-Smtp-Source: ABdhPJx77EqgyTzX/WB9pLI654wcqvCnxsud4zD6/zi+m1yh/dW8NTsd4BDJmEuolMEld2dSk+raaQ== X-Received: by 2002:a7b:c259:: with SMTP id b25mr8740267wmj.107.1595426187039; Wed, 22 Jul 2020 06:56:27 -0700 (PDT) Received: from ?IPv6:2001:8a0:f91a:c400:56ee:75ff:fe8d:232b? ([2001:8a0:f91a:c400:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id p11sm17917wre.32.2020.07.22.06.56.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jul 2020 06:56:25 -0700 (PDT) Subject: Re: [PATCH][gdb/doc] Fix to manual for description of remote protocol To: Reuben Thomas , gdb-patches@sourceware.org References: From: Pedro Alves Message-ID: <5fbf55a9-2fe9-6018-79d5-7bcedf547f2f@palves.net> Date: Wed, 22 Jul 2020 14:56:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.9 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 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Wed, 22 Jul 2020 13:56:30 -0000 On 7/21/20 8:14 PM, Reuben Thomas via Gdb-patches wrote: > --- > gdb/ChangeLog | 5 +++++ > gdb/doc/gdb.texinfo | 13 +++++++------ > 2 files changed, 12 insertions(+), 6 deletions(-) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index fad4608002..f2f9302078 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,8 @@ > +2020-07-21 Reuben Thomas > + > + * doc/gdb.texinfo: Correct the description of which remote > + protocol commands are mandatory for a stub to implement. > + Note this should go to the gdb/doc/ChangeLog file instead. > 2020-07-20 John Baldwin > > * fbsd-tdep.c (fbsd_skip_solib_resolver): New function. > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index a002084d5b..1e72c0ed32 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -39134,12 +39134,13 @@ For any @var{command} not supported by the stub, an empty response > protocol. A newer @value{GDBN} can tell if a packet is supported based > on that response. > > -At a minimum, a stub is required to support the @samp{g} and @samp{G} > -commands for register access, and the @samp{m} and @samp{M} commands > -for memory access. Stubs that only control single-threaded targets > -can implement run control with the @samp{c} (continue), and @samp{s} > -(step) commands. Stubs that support multi-threading targets should > -support the @samp{vCont} command. All other commands are optional. > +At a minimum, a stub is required to support the @samp{?} command to tell > +@value{GDBN} the reason for halting, @samp{g} and @samp{G} commands for > +register access, and the @samp{m} and @samp{M} commands for memory > +access. Stubs that only control single-threaded targets can implement > +run control with the @samp{c} (continue) command. Stubs that support > +multi-threading targets should support the @samp{vCont} command. All > +other commands are optional. > I see you're dropping the reference to the s (step) command. However, either "s" or "vCont;s" _are_ mandatory if the target supports hardware single-step. E.g. an x86 stub that doesn't implement s or vCont;s won't work. GDB only implements software single-stepping for architectures that don't do hardware stepping. The choice of whether to require s is a little more complicated than that, but I don't think we need to go into too much detail here. Do you think the version below is clear enough? >From 68e60bc53a040ad2750277aaa5fc7019eb051c22 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Wed, 22 Jul 2020 14:19:17 +0100 Subject: [PATCH] Correct an error in the remote protocol specification The list of commands that a stub must implement was wrong. gdb/ChangeLog: 2020-07-21 Reuben Thomas * gdb.texinfo (Remote Protocol, Overview): Correct the description of which remote protocol commands are mandatory for a stub to implement. --- gdb/doc/gdb.texinfo | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index a002084d5b9..3bd8ddfd624 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -39134,12 +39134,15 @@ For any @var{command} not supported by the stub, an empty response protocol. A newer @value{GDBN} can tell if a packet is supported based on that response. -At a minimum, a stub is required to support the @samp{g} and @samp{G} +At a minimum, a stub is required to support the @samp{?} command to +tell @value{GDBN} the reason for halting, @samp{g} and @samp{G} commands for register access, and the @samp{m} and @samp{M} commands for memory access. Stubs that only control single-threaded targets -can implement run control with the @samp{c} (continue), and @samp{s} -(step) commands. Stubs that support multi-threading targets should -support the @samp{vCont} command. All other commands are optional. +can implement run control with the @samp{c} (continue) command, and if +the target architecture supports hardware-assisted single-stepping, +the @samp{s} (step) command. Stubs that support multi-threading +targets should support the @samp{vCont} command. All other commands +are optional. @node Packets @section Packets base-commit: 39fdda0744607575103b30ffbec3cdb99f8d2501 -- 2.14.5