From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 7F79A3858D1E for ; Tue, 19 Mar 2024 16:01:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F79A3858D1E 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 7F79A3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710864076; cv=none; b=CSZioxzqbNatnAYAF03F0ALAw1y1F/IeNdG1VFikzxftSADFRSB1gPSLuBueNM+AEhmqYVY1B6jl9KXnYretyFst0NZCfRVICPBWlwIKypZvhIzcd85QduyWx2aqA5oj67G+zNnZ3E0xWZkOIg/s9G94irXvWU+jUQtIeXhqr+o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710864076; c=relaxed/simple; bh=/+/RfqsNw2xQQA9WC6SzeEHjddq0LQr6OVxVNie/820=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Zoj2tea7qOhB0v8nM/9s59HdrHa7b8KkyIBBxOSeRdsOS5s2DKXBqIB5FG55k5UgN30qSsxSLYwxpibAE/a22aolRp1OdnCpN2pAF+XHS38cizWP05hP/SMJUOvi37m/Y+MF+FX3Z2apDHEP/lHUTcUThqwVfKMqI2d13bje/s0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5008a.ext.cloudfilter.net ([10.0.29.246]) by cmsmtp with ESMTPS id mRcirhrxGDI6fmbtlrmGp6; Tue, 19 Mar 2024 16:01:09 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id mbtkriz33iDnembtkrIJ0Z; Tue, 19 Mar 2024 16:01:08 +0000 X-Authority-Analysis: v=2.4 cv=Cd4O5qrl c=1 sm=1 tr=0 ts=65f9b6c4 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=K6JAEmCyrfEA:10 a=Qbun_eYptAEA:10 a=QyXUC8HyAAAA:8 a=t5ECbP5pI2M1_pRCcp0A:9 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:In-Reply-To:Date:References :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-Subscribe: List-Post:List-Owner:List-Archive; bh=KaVstxGmcw4SH03r9XFXczFRrlMF92Fmuvo4QOj5VyE=; b=rT4gmMEdwMRzwpgvdKLko5uC7w pfdRTvPN2dnpM0eKfH0AbKBoKjE8i2hgm/1JXMHA0EREZiCHMWQYPgV78FAWZak5eME+bjjxMF8l0 L/meoADJS5lLm2nEAXU9Vh6Np; Received: from 97-122-82-115.hlrn.qwest.net ([97.122.82.115]:46298 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rmbtj-000VIu-2A; Tue, 19 Mar 2024 10:01:07 -0600 From: Tom Tromey To: "Aktemur, Tankut Baris" Cc: Tom Tromey , "gdb-patches@sourceware.org" Subject: Re: [PATCH 3/3] gdb, gdbserver: introduce the 'x' RSP packet for binary memory read References: <990be8b42f1f6ca33ffed7a8ae7ead327009d847.1710343840.git.tankut.baris.aktemur@intel.com> <87h6halypk.fsf@tromey.com> <87v85pkmkl.fsf@tromey.com> X-Attribution: Tom Date: Tue, 19 Mar 2024 10:01:06 -0600 In-Reply-To: (Tankut Baris Aktemur's message of "Fri, 15 Mar 2024 09:59:37 +0000") Message-ID: <87o7bagqil.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) 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.82.115 X-Source-L: No X-Exim-ID: 1rmbtj-000VIu-2A X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-82-115.hlrn.qwest.net (murgatroyd) [97.122.82.115]:46298 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: MS4xfFNMcsRWj32UD2rf10z8gBJltvOrVZhuiC2QmS7y1JFkxDaOL8x5tbwwydKDp/ZPtlButmbdw2cezkVJsvDbKwd+Caw8I7Aa3VqutYX8bcpUy4gJo9/S A7VEYd/XE2XvmgBagzMht45pv7zX1ojM1uCNMPPjxGTEeXl+orKon05VMsYLmESH6DqRUH1qoYeMyS4hZCWeQSMEmc6yKMdyFDM= X-Spam-Status: No, score=-3015.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> Aktemur, Tankut Baris writes: >> I think the probing idea is that you simply try the 'x' command the >> first time it is needed. If remote sends an empty response (not an 'E' >> response), then the packet isn't supported, so you disable it and retry >> with 'm'. >> >> This is documented in the Overview node: > Yes, I get this idea, and the 'X' packet actually uses it. My concern there is > that (1) sending this packet with an arbitrary address and length 0 seems too > artificial; (2) using the proposed reply format, the target would send an empty reply > both when it does not recognize the packet and when it recognizes because the length > argument in the probe is 0 (the same problem would exist with the 'm', 'p', 'g' packets > if we were to probe them). This would not be an issue if we decide to force the reply > to always start with a marker character, as suggested in Ciaran's email. I definitely think that gdb should not send an 'x' packet with an arbitrary address and a length of 0. Instead the idea is that if the packet is not explicitly forbidden (either via a gdb command or by previous probe failure), just attempt to use this packet for the first memory read. If the remote reports the packet as unsupported, fall back to the 'm' packet and carry on. I think the docs should be explicit about what a 0-length read means. I tend to think this should just be an error. I also prefer Ciaran's idea for the response packet. I didn't realize other packets already did this or perhaps I would have suggested it. thanks, Tom