From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 87DF13857C46 for ; Tue, 21 Jul 2020 16:36:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 87DF13857C46 Received: by mail-wr1-x434.google.com with SMTP id f2so21802259wrp.7 for ; Tue, 21 Jul 2020 09:36:11 -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=ucrB84z2Jf/xZSmSuCfmDv6jkWRNCMUhFdx68J1V/7g=; b=piT/DMsj7Rho9aRWWtY06501x+y0VSk6WUYMqanb/HLzQ1JrgSgGsYl+KAHvmdhfYw YEMvMRDePrDTnxg02obRc1YM0yx0dp6P4JwD8FBykj0MxZKBZAvmhcF+WBvGECMDb+bv Y8D7zX7N829abQ9JQsjgDvF3XrMtrkK5SlKdOvJeE4YFK++raR6HCgswEn+ktyCgldrF 9ms21iDJMgBDQfooHEv08J8+7fcSf5cxjrlqeabhZHmhG7BExNus8Wgg9XsKPmXAtfam ALGxPyIUx32Ms/VAkyanNpjreUp7KFS/da7IRuEXN2hrPZz4gqRm93tfRi34sBHUL/+w 8Wyg== X-Gm-Message-State: AOAM530IMaL01vhjTe4RsyQvm2Oj8xW4plal+u0LEh2eIjwUGjwgY/7m pNaWtunY+BMzfxaD57X7AGZfkOl4mCAc+ZtVrYc= X-Google-Smtp-Source: ABdhPJxd5JIXwKT2acZBgCG5sj2lCdFqiaKiwjExuGk8CFYa4zzujoRLGSawt8KJm/aMhUt9XTHxV1udCcOpG3kOTJc= X-Received: by 2002:a05:6000:1143:: with SMTP id d3mr26062280wrx.235.1595349370627; Tue, 21 Jul 2020 09:36:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Christo Crause Date: Tue, 21 Jul 2020 18:35:57 +0200 Message-ID: Subject: Re: Remote protocol question: the documentation says '?' is not required, but maybe it is? To: "Maciej W. Rozycki" Cc: Reuben Thomas , Reuben Thomas via Gdb X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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 16:36:12 -0000 On Tue, Jul 21, 2020 at 1:34 PM Maciej W. Rozycki wrote: > On Tue, 21 Jul 2020, Reuben Thomas via Gdb wrote: > > > 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 "?". > > FYI, I do believe `?' is indeed mandatory, as GDB needs to figure out the > initial state of the remote target as it has connected to it, and there is > no other way. Documentation may be incomplete/incorrect here, and fallout > from the lack of response (a protocol violation) might be better. > > Maciej > I've tested this (empty reply for the ? packet) in gdb 8.3 and it also results in gdb hanging, in agreement with Reuben's observations. I therefore think Maciej is correct, the ? packet is required and should be marked as mandatory.