From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MacZDiQA8mpkyToAWB0awg (envelope-from ) for ; Mon, 09 Nov 2026 12:17:24 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=KODy0y9r; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 181551E023; Mon, 09 Nov 2026 12:17:24 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5F2121E023 for ; Mon, 09 Nov 2026 12:17:22 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D3B464BA23F8 for ; Mon, 9 Nov 2026 17:17:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3B464BA23F8 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=KODy0y9r Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id 121E34BA2E36 for ; Mon, 9 Nov 2026 17:16:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 121E34BA2E36 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 121E34BA2E36 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794244616; cv=none; b=WEt92rnPAzFBPONjS4kg8k42bnO2YBLYcdZtkb1mNwXT0D1VtZL4V4NrPUIpWjdnVN+6LpPHA2Za5xojQF31rbaGY7Q1osItEyA+lCoy0kp4KNjokWbsLks349jntyQ2Aes1J2wN1FlZEUJJ5L0jS5yQ4PnJKdPBlS54HwCnQZE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794244616; c=relaxed/simple; bh=RSZT9S4kUxABZelzjmamAuYVS4mqfYaVmF/KI36Qf1c=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UQleHJYMVVhSSmtGynZQfRAicYEOqI18nmibOj5r2JWt4gx7dDRMogWQAZdYMP5jFyhiv7O8zMmk1vs3Omth3dWbIilR5Nbtx+FAlkQH2ohdTP2Acfq+PD/zOaynBvmB88RpU2P2/QxdSmuNRkhYDPXzVkpD9Zy6Ft5m746GuNk= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=KODy0y9r reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 121E34BA2E36 Received: from eig-obgw-6003b.ext.cloudfilter.net ([10.0.30.175]) by cmsmtp with ESMTPS id QMAUx4BLtOOJnQSzHx4DCT; Mon, 09 Nov 2026 17:16:55 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id QSzGxH3OfGh2BQSzGxubum; Mon, 09 Nov 2026 17:16:54 +0000 X-Authority-Analysis: v=2.4 cv=Aszu3P9P c=1 sm=1 tr=0 ts=6af20006 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=zJRp6_cAMcgA:10 a=ItBw4LHWJt0A:10 a=CCpqsmhAAAAA:8 a=20KFwNOVAAAA:8 a=zstS-IiYAAAA:8 a=PZKpuqC5WoW-zuxuvbgA:9 a=ul9cdbp4aOFLsgKbc677:22 a=4G6NA9xxw8l3yy4pmD5M:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=M19tuxfnhaFTp3gkolov7hq0nFHznuD0vhZRJYYF1Qg=; b=KODy0y9rNY7dVdWxoBDi6xrxTW Or/CqZJ715WCdZQFMbVyXSl3nmIUw4csWBTnly8jSZALMzuTuKmiFhBwkNxiK6y3IW/c8F6fz4G+g 6Piezna9pt92QggHvDwWOjg9g; Received: from 97-122-110-129.hlrn.qwest.net ([97.122.110.129]:45616 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xQSzG-0000000241O-07jw; Mon, 09 Nov 2026 10:16:54 -0700 From: Tom Tromey To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/3] gdbserver: add support for p/P packets and flag to disable g/G packets In-Reply-To: <56997cef31b53dbd71d0a1cfa5d163aee6e9f422.1794238395.git.aburgess@redhat.com> (Andrew Burgess's message of "Mon, 9 Nov 2026 15:35:51 +0000") References: <56997cef31b53dbd71d0a1cfa5d163aee6e9f422.1794238395.git.aburgess@redhat.com> X-Attribution: Tom Date: Mon, 09 Nov 2026 10:16:53 -0700 Message-ID: <87a4nhvsai.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.110.129 X-Source-L: No X-Exim-ID: 1xQSzG-0000000241O-07jw X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-129.hlrn.qwest.net (bapiya) [97.122.110.129]:45616 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfKPzd5SXsmA/5J7yakhR1uMVk/g8ldFd4pxjUQjogdEeXD6oa64bve6x3OvHNVjyRpHYC0JO4Ec6FUGfugQc8xOf6hYPLl57t1lXKaNnT2LuoUKccvlx 64d/+9pf6fphRYuTz9EvrA/HLvCPg4hg9fbv3oFMOPblQsx77/pqX8+13fzeFQMPRUykW3fZqREx8TB7/aomQsw/wXvLX8Wt8NM= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Andrew" == Andrew Burgess writes: Andrew> I understand that gdbserver is a real tool, so we should not be Andrew> overloading it with "testing" features, but supporting the 'p' and 'P' Andrew> packets doesn't cost that much, and this would allow for greater Andrew> testing of GDB. I'm actually more supportive of this approach in general. While gdbserver is a real tool, I think it's also important for testing that gdb conforms to the protocol as documented. Features like this play a role there. So I think this kind of change is a positive on the whole, and the biggest issue is to make sure that the defaults are good. I suppose maybe if there was a very invasive proposal along these lines, we would want to have a discussion. But I don't really anticipate it. Andrew> Annoyingly there was one fix needed in GDB itself. The 'g' packet Andrew> handling in remote_target::send_g_packet (gdb/remote.c) has a rather Andrew> nasty loop which tries to "resync" with gdbserver by resending the 'g' Andrew> packet if the response doesn't look right. I thought I had seen a bug report about this but all I could readily find is: https://sourceware.org/bugzilla/show_bug.cgi?id=8318 which is like tangentially related but not really on point. The docs do say that g/G are required, so maybe it just really hasn't come up. Maybe supporting p/P is an optimization and these actually should be enabled by default? To be clear I don't think that has to be decided in this series. Andrew> And compare the results to those of running without the disable-packet Andrew> option. The only issues I saw were in trace related tests, the Andrew> function remote_target::get_trace_status relies on sizeof_g_packet to Andrew> define the trace register block. For a target without 'g' packet Andrew> support the sizeof_g_packet becomes 0, which means the trace file Andrew> records a register block size of 0, which breaks all the trace related Andrew> tests. This is a pre-existing issue, and not something I plan to Andrew> address in this commit. I'm not sure how much we care about this but perhaps it's worth a follow-up bug report. My sense is that tracing isn't really used but of course it's hard to know for sure. I'd be comfortable saying that a server that supports tracing also has to support the g packet. Andrew> +bool disable_packet_gG; I think this one can be static. Anyway this looks good to me. Thank you. Approved-By: Tom Tromey Tom