From patchwork Mon May 15 09:32:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 20444 Received: (qmail 57743 invoked by alias); 15 May 2017 09:33:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 57725 invoked by uid 89); 15 May 2017 09:33:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=arrive, H*MI:andrew, undocumented, Hx-languages-length:1932 X-HELO: mail-wm0-f42.google.com Received: from mail-wm0-f42.google.com (HELO mail-wm0-f42.google.com) (74.125.82.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 15 May 2017 09:33:01 +0000 Received: by mail-wm0-f42.google.com with SMTP id u65so74783279wmu.1 for ; Mon, 15 May 2017 02:33:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bbrDYNb4vKgcXkCefB5TSfpzpQfmtgViw+rFx4ayOsA=; b=C5Q5ClyybZDx9pVfE/odsMKlz2b9o9syQLAPmdwB3WRveoAC35zu2VKOzCQl9h7w3n /9sOKJlf4o4CA0qEc0/SKgohzJtYoq+ya2gSFpIx5ITVAtHgDTGqULZM9ZOHGU9ivHTY G7P2A6ELvVcys3qkgRf5kxX4p7AvY6dJz74dhjuthPIhnf3MYq+H+zRMQ5ehGRIAn+W1 89FnodAljO3vL393W98Oe99t1Xqnv06FMRa097Cr9L3oUsayduSJvGCi6xatT9F+RoNf X3Ls/vrkI11N8+IOlIePx6Bk+xOOrMA1Cmw55jLDibDFZBFBGX1tzwvOJRj96UYQzmGw a36w== X-Gm-Message-State: AODbwcAA5k+7yFYZMVWBHgy8xQ0jVybLSeTyPSUlj4NIesh3jS2fZ+fE ph44omlq8tn26g== X-Received: by 10.28.87.16 with SMTP id l16mr3009447wmb.114.1494840781581; Mon, 15 May 2017 02:33:01 -0700 (PDT) Received: from localhost (host81-158-205-179.range81-158.btcentralplus.com. [81.158.205.179]) by smtp.gmail.com with ESMTPSA id 39sm13489830wru.50.2017.05.15.02.32.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 May 2017 02:33:00 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH] gdb: Document vMustReplyEmpty remote packet Date: Mon, 15 May 2017 10:32:58 +0100 Message-Id: <1494840778-18726-1-git-send-email-andrew.burgess@embecosm.com> X-IsSubscribed: yes Add mention of the vMustReplyEmpty to the remote serial protocol documentation. It is important that this packet be treated in the same fashion as any other unknown 'v' packet, and I have tried to reflect this in the description of the packet, it is not simply the case that we _must_ return the empty string for this packet. As the intention is that we should treat this packet as unknown then an argument could be made that we should not document it, however, for someone implementing a gdbserver from scratch, seeing an undocumented packet arrive from gdb is confusing, and will probably cause them to have to read the code in order to check how this packet should be handled, which is not ideal. gdb/doc/ChangeLog: * gdb.texinfo (Packets): Document vMustReplyEmpty packet. --- gdb/doc/ChangeLog | 4 ++++ gdb/doc/gdb.texinfo | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index f2e6156..6c412c1 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -35827,6 +35827,19 @@ for success @end table +@item vMustReplyEmpty +@cindex @samp{vMustReplyEmpty} packet +The correct reply to an unknown @samp{v} packet is to return the empty +string, however, some older versions of gdbserver would incorrectly +return @samp{OK} for unknown @samp{v} packets. + +The @samp{vMustReplyEmpty} is used as a feature test to check how +gdbserver handles unknown packets, it is important that this packet be +handled in the same way as other unknown @samp{v} packets. If this +packet is handled differently to other unknown @samp{v} packets then +it is possile that gdb may run into problems in other areas, +specifically around use of @samp{vFile:setfs:}. + @item vRun;@var{filename}@r{[};@var{argument}@r{]}@dots{} @cindex @samp{vRun} packet Run the program @var{filename}, passing it each @var{argument} on its