From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta034.useast.a.cloudfilter.net (omta034.useast.a.cloudfilter.net [44.202.169.33]) by sourceware.org (Postfix) with ESMTPS id 58CAC385841F for ; Wed, 20 Mar 2024 20:13:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 58CAC385841F 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 58CAC385841F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710965582; cv=none; b=C2YW0rC6B7v6jEkSQl2SnGck5JtUk9DLcMk6OspfHMFcYwNW8/WaeIUxn3vuwGuSNXRukfio/dKIa0WF7p4uo4K5F1qrh5Qdpm38EojvjJVXWpGWrldSH1bCAG/rFjWm/uan1UnGgiMO6e2c2Wmp3pY1hX9/gFIvIh3wnrl8740= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710965582; c=relaxed/simple; bh=HVTlfPfAC1iLG7dsM4pqpQlHisp0oRju/zYLxuJeI1Q=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RXadkkXU1S/q2YzoGOdLONFgAK8vcU1P129fR2F3RHW5yD9potuQyk7jNgzfa41JYVG84XzDc+XM0RI1iRXZ5Gv+t+2HDaZrzv1R4yJjlvu04VULLv7BZqNd8WP49DFHwBYWJYLlE68f5Y5Qvze8U/T+1S0MBJKt5EaHRQ6SdTs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5007a.ext.cloudfilter.net ([10.0.29.141]) by cmsmtp with ESMTPS id mRchrcyCws4yTn2J1r1gFU; Wed, 20 Mar 2024 20:12:59 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id n2J0rea5SeXgGn2J0rakyc; Wed, 20 Mar 2024 20:12:58 +0000 X-Authority-Analysis: v=2.4 cv=Q/PU4Z2a c=1 sm=1 tr=0 ts=65fb434a a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=K6JAEmCyrfEA:10 a=Qbun_eYptAEA:10 a=HSTaoXoua1nOnD50ghcA: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=vCkiB2bTbA+o0w/wysu5Gotfa8+IMZGqysm+DM8zbqI=; b=UREWswQi0lYP2jQCR+hEhFa85C b3d+8ghrz7c7muyewhZNBVWRXUNod/8kmwABwx/T7fZYsKUysRq8XE0mfFCROBPfQ+P4yC6Bz5wt4 WxGtqojNgfMQo83w0GCVSBuXV; Received: from 97-122-82-115.hlrn.qwest.net ([97.122.82.115]:59114 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rn2J0-003J5i-0C; Wed, 20 Mar 2024 14:12:58 -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> <87o7bagqil.fsf@tromey.com> X-Attribution: Tom Date: Wed, 20 Mar 2024 14:12:57 -0600 In-Reply-To: (Tankut Baris Aktemur's message of "Wed, 20 Mar 2024 17:32:00 +0000") Message-ID: <875xxgu0fq.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: 1rn2J0-003J5i-0C X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-82-115.hlrn.qwest.net (prentzel) [97.122.82.115]:59114 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfHBdMalmcOurhmDjZWwbqBDOtCAbv8JytLAcelHsvOFPyG2iVNFBikfafeUcQV2dhRz7ottQBhWF809RLyKVhbex/1l7vYbB+98IDkJefbvvY9hZ/7Od nJzGPdMj9WSRFuMtw003nYe+NgvQSyLuOBo72pylRIpFv59vc7Fs2KWs9d6VYpAoZDbovPRVUFxltbGLadTMYPCm/+rK661L5AE= X-Spam-Status: No, score=-3015.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,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: >> 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. > You mean, just as "x\0", without any arguments? (Please also see the end > of the email about this) What I mean is refactor remote_read_bytes_1 to try the 'x' packet the first time it is called (assuming the 'x' packet is not already banned). If the remote replies that 'x' is unsupported, disable it and continue to the 'm' packet. > My first reaction would be that it depends on the given address. If the > address is accessible, it seems viable that a zero-length read is trivially > a success, akin to defining an empty string. If the address is not > accessible, however, it would be an error. I suspect not all remotes can make this determination. So, if this is the semantics of a 0-length read, then maybe the packet can't be used in some situations. However I tend to think gdb should simply not do 0-length reads. Tom