From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id B67513857C56 for ; Tue, 21 Jul 2020 10:22:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B67513857C56 Received: by mail-wr1-x430.google.com with SMTP id o11so20644719wrv.9 for ; Tue, 21 Jul 2020 03:22:32 -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=L3Z8G13hf6y2eOjC/ImOQ/a+38J/P28dhRx3/n8ERfs=; b=m9ZU1+ccQJ19YvUR/YZFS3dsY1M7NC49LZNioJUtyaNt9MmGcpIfUn1bVncO58o1L7 52R3TQM1ij/zZp53VgEMT6hOsr49BukxoMwe94F8S+MvenIySLn6VMmbzYFKX0BnUdo9 Zbpx1vu4kVmq7/DnzZjgRHdew/pHCh8n0HMqZRosNxlyGZw1zEjHCRar6ZrrZY7MfBij LIX3pxBoaChf9FCURGA4vyBufnAhVJpMP/mk+AGZxWxyYMkbVPoglWpG19gkRO9Zbdzv nb+5natmJ1zlTWNDAd7ve+Iiv9CNtUA6WTSlBrUbYwDSZFmogVgMo/x38Ru4GLNlysBt aQrA== X-Gm-Message-State: AOAM530mZkaxsf0YLKOkooawc9FWebE3izqrAu2wqbxExzkAgYoj0JOm lJELaEO1WdOQt4soV/Qlyqagqjggn7BMglFCZsL8L41MzAY= X-Google-Smtp-Source: ABdhPJwroXzMdkRjGsCLCB+Z7tqJ1+nPVfsJfHHyN9sxrxUUEzKadQZ0MmtoYmrYIoNNlEaVkS6OYuTx5DuJ0QOnyqA= X-Received: by 2002:a5d:6646:: with SMTP id f6mr11373728wrw.155.1595326951746; Tue, 21 Jul 2020 03:22:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Christo Crause Date: Tue, 21 Jul 2020 12:22:20 +0200 Message-ID: Subject: Re: Remote protocol question: the documentation says '?' is not required, but maybe it is? To: Reuben Thomas Cc: 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 10:22:34 -0000 On Sun, Jul 19, 2020 at 9:09 PM Reuben Thomas via Gdb wrote: > In particular, this suggests that it is not necessary to support the '?' > command, which returns the most recent signal. > > My simple remote stub indeed implements only 'g', 'G', 'm', 'M', 'c', 'd' > and 'k'. It also implements '?', and, on startup, sends a 'T' packet. > > However, if I remove the implementation of '?', the following conversation > ensues with gdb: > > putpacket: > > > T0500:f4dff800;01:f4dff800;02:00400000;03:f580a200;04:00001000;05:00000000;06:f5805200;07:00001000;08:00000000;09:ffffffff; > > getpacket: > > > qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+ > > putpacket: > > getpacket: vMustReplyEmpty > > putpacket: > > getpacket: Hg0 > > putpacket: > > getpacket: qTStatus > > putpacket: > > getpacket: ? > > putpacket: > > getpacket: qfThreadInfo > > putpacket: > > getpacket: qL1160000000000000000 > > putpacket: > > getpacket: Hc-1 > > putpacket: > > getpacket: qC > > putpacket: > > getpacket: qAttached > > putpacket: > > warning: Invalid remote reply: > > > > and GDB hangs. It seems that it can't cope with my lack of reply to '?'. > 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.