From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id D06113857C45 for ; Tue, 21 Jul 2020 20:26:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D06113857C45 Received: by mail-ot1-x32d.google.com with SMTP id 18so137576otv.6 for ; Tue, 21 Jul 2020 13:26:42 -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=BhEz+L+ghGg9MBwvLtyblJrEfH3PDhchkARF2ygZlJY=; b=c0nhSn9rXo9IDY9JjZ61ye43IwCjk5QEi/OEYwCHT9wR6/R19uKbYdTdmDxCy6rIqQ kd5+LImj/Bu/DZXM4/H8JwThPTtFBPIolQO0l7GuquPGQ7L18BXDV4QWKKLQtAbW4m7p GGdB0OKv/f5OwAf8W9UjtunVNKKrUAgNGFP88H/UwDMAiIT2myWWI2cAm7eTa9fOtLdK ma9l/e0wUDGJYWAJHeVx8YrvbLqdszoQdNWufBZ0qNUFCVpETfmzcXM6WOy0Jmv7dWJx 1kFhIjaSnjr6a8yv5OAeAJB/nAosXFFNjRE3Zhnp+wJgEzuWZoj7YKHLnENd72I34n2G nEkA== X-Gm-Message-State: AOAM533LhTH3aI7zubUDgmVuYRNcfQKUbpx1ZUT0xN1lsQfkj4bXzRRb 1hdG1DhZF1ThVd1BGKcd0iaLzBkQ3TyaK79vxOHMYQ== X-Google-Smtp-Source: ABdhPJxbVy/gyZ/RxVBXQ9pRU7gQiMJgq7D6SjRMT6jUOpCISQDGETWDeeZeShH5dihoXbPGYtyY/V1NYKoIT6mL67Y= X-Received: by 2002:a05:6830:1e42:: with SMTP id e2mr25066508otj.46.1595363201879; Tue, 21 Jul 2020 13:26:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Reuben Thomas Date: Tue, 21 Jul 2020 21:26:30 +0100 Message-ID: Subject: Re: Remote protocol question: the documentation says '?' is not required, but maybe it is? To: "Maciej W. Rozycki" Cc: Christo Crause , Reuben Thomas via Gdb X-Spam-Status: No, score=-3.3 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 20:26:44 -0000 On Tue, 21 Jul 2020 at 21:24, Reuben Thomas wrote: > On Tue, 21 Jul 2020 at 20:34, Maciej W. Rozycki wrote: > >> On Tue, 21 Jul 2020, Reuben Thomas wrote: >> >> > > 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. >> > >> > It seems to be more complicated than that. In principle, '?' isn't >> needed >> > in principle to figure out the initial state: the T packet, or in my >> > current case, the S packet tells GDB the signal, and yet GDB still asks >> for >> > it again with '?'. The signal that caused the remote to halt is not >> going >> > to change until the next 'c', so there's no need for GDB to ask for it >> > again; and yet it does. >> > As I mentioned earlier, gdb discards this first 'T' packet, so that explains why it needs to send '?', even in principle. But that doesn't seem to be relevant, as gdb always sends '?' at the start of a conversation.