From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23220 invoked by alias); 9 Oct 2018 20:12:38 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 22974 invoked by uid 89); 9 Oct 2018 20:12:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*c:alternative, wish X-HELO: mail-vs1-f43.google.com Received: from mail-vs1-f43.google.com (HELO mail-vs1-f43.google.com) (209.85.217.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 Oct 2018 20:12:35 +0000 Received: by mail-vs1-f43.google.com with SMTP id i10so2811029vsm.13 for ; Tue, 09 Oct 2018 13:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m51p3HvugrdKW2ksqAkDtuT+ncYnvSfhGohbyICHYI0=; b=LEIqw+OEtVW3QFLiHlR73Amt+0X6Gs5p1Arw0rB3xDurOXe54hFWoL3xoau+pI9WWf +0olXdS7mo+gZtU/Xbuz6uHCRmq2kn3OF1pspEtxt1WW11H9QdkU5gvQ1MBtM2QqYrAN eh0Y+KfX4zUUKxfHmSanfhTdVtYIvyypDst6xJdLQbPpe0jwZowgiGT/nUP1l0RLMjav SWzh5FRdHnZW2esm8kdlD2ojkhgqGGw90Kj+mN9QshYNX7VMVx099imuG+SXw2HnItad l9k20VXG4b2YY8NNxGqDiF1lgM9gaic5WSHQRdzB1+4DNNawZRGteVIy5FaTjlPptV5Y J4aQ== MIME-Version: 1.0 References: <0eeb55ca-d4e1-4db4-e601-74ca7e1151e2@redhat.com> In-Reply-To: <0eeb55ca-d4e1-4db4-e601-74ca7e1151e2@redhat.com> From: Bill Morgan Date: Tue, 09 Oct 2018 20:12:00 -0000 Message-ID: Subject: Re: gdb ignoring vCont supported commands To: palves@redhat.com Cc: gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00016.txt.bz2 On Tue, Oct 9, 2018 at 1:30 PM Pedro Alves wrote: > On 10/09/2018 02:42 PM, Bill Morgan wrote: > > I tell gdb that I support only vCont c and C, so it sends me s. Why is it > > sending s when I don't support that? > > > > (gdb) s > > Sending packet: > > $QPassSignals:e;10;14;17;1a;1b;1c;21;24;25;2c;4c;97;#0a...Ack > > Packet received: OK > > Sending packet: $vCont?#49...Ack > > Packet received: vCont;c;C > > Packet vCont (verbose-resume) is supported > > Sending packet: $vCont;s:13;c#f4...Ack > > Packet received: E01 > > warning: Remote failure reply: E01 > > That's historical behavior, and GDB cannot change it, unfortunately. > But the good news is that in more recent GDBs there is a protocol > extension to tell GDB to trust the set of reported supported > vCont actions. > > Copying what I said here: > https://sourceware.org/ml/gdb-patches/2018-09/msg00359.html > > ~~~~~~~~~~~~~~~~~~~~~~~~ > GDB can't trust "vCont;c;C" alone, because for a long > while GDBserver would send "vCont;c;s;C;S" even if the target > did not support hardware stepping. So what a stub needs to do > is: > > Return "vCont;c;C" to "vCont?" _AND_ include "vContSupported" > in the reported "qSupported" features. The latter tells GDB > to trust that the actions included in "vCont?" are really the > supported ones. (I wish we had implemented this a little bit > differently, but that ship has sailed, and although a bit > cumbersome, it works.) > ~~~~~~~~~~~~~~~~~~~~~~~~ > > I get a warning that vContSupported is unrecognized: Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df...Ack Packet received: PacketSize=3fff;QPassSignals+;qXfer:features:read+;qXfer:threads:read+;vContSupported Packet qSupported (supported-packets) is supported warning: unrecognized item "vContSupported" in "qSupported" response I am using this version: GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git > Thanks, > Pedro Alves >