From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id 0721D3857C56 for ; Tue, 21 Jul 2020 10:29:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0721D3857C56 Received: by mail-oi1-x22d.google.com with SMTP id t4so16767959oij.9 for ; Tue, 21 Jul 2020 03:29:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o6E1A/E2vELTCt8P6+BkMEU+dYC0+CDjNuMrZ1XThVk=; b=Qq8eq6+m0g8Si8SICMLu8wweEyXegOaP0sTtCTPppHmH7DJsbNPGc82OIjsra5h4Vj w7FfQkMatX77CiyapH3fOyIh1ZfIJ4o2SWw1ZKbxDUQuHSdL6ze7NJ1YYElzXInzsyW7 0IdDN/SoCyaQCb/QMwZmOnx4q2tRdjZOmVZC2Q+ZNKJyRpkSwHN8GH+WQ7DJzbzOEV9p WL+v8DIsYlwJpUgRvVG0rMtNNFbKps31w0/oyUH2dyh3UHmmjiTxP/6jy6IGu6UsNQ35 EyWNmv+lOA5Xn/RKEKAqa33r7RAUoNgnqGDVA3ZqOIvKmtnO7ylrPxSQ0wac180zSE1A XtRw== X-Gm-Message-State: AOAM532k4e4iEvTSPM89nd/GOAQpOfuZBb+ggVkqtnVHAhNJQ19hjsWP n0qbcfDWhCEOva+Tga4LS/D4v+NyRaQVlQNc9GiC0A== X-Google-Smtp-Source: ABdhPJxCH1/pbvuV47yA/4HvOuMkYuKBMoP9azdvNtrWdgI+Jnu2czUCikTI7fnI+boEbxpN7CVLvoUMmuRfH3+O4pA= X-Received: by 2002:aca:e1d6:: with SMTP id y205mr2428263oig.179.1595327379409; Tue, 21 Jul 2020 03:29:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Reuben Thomas Date: Tue, 21 Jul 2020 11:29:28 +0100 Message-ID: Subject: Re: Remote protocol question: the documentation says '?' is not required, but maybe it is? To: Christo Crause Cc: Reuben Thomas via Gdb X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2020 10:29:41 -0000 On Tue, 21 Jul 2020 at 11:22, Christo Crause wrote: > Reading E.3 suggests that the stop reply packet (S or T) is only expected > after gdb issued one of a few specific commands. So my interpretation (I'm > no expert on the topic) is that your unsolicited T packet is confusing gdb. > It seems as if your debug log is from your gdbserver perspective, can you > also check the communication received on gdb side (set debug remote 1), > this may highlight the reply gdb is complaining about. > Thanks for getting back to me! I don't think you're right, for two reasons: first, I am sending the T packet in response to 'c'. (Except the first time, when of course I didn't get a command, but effectively this is the stub returning from 'c'.) Secondly, I copied this code from sparc-stub.c in the GDB sources. Also, whether or not I send T does not affect GDB's behaviour. In fact, I shortened my code by changing it to send an S packet instead, which also works fine, but still GDB needs me to implement '?'. The "invalid remote reply" is in response to the stub sending an empty reply to "?". -- https://rrt.sc3d.org