From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id HOnmDtXx8mX9zwYAWB0awg (envelope-from ) for ; Thu, 14 Mar 2024 08:47:17 -0400 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=DKEDMndD; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 29B5E1E0BB; Thu, 14 Mar 2024 08:47:17 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 15CDA1E01D for ; Thu, 14 Mar 2024 08:47:15 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8568B3857713 for ; Thu, 14 Mar 2024 12:47:14 +0000 (GMT) Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id B1F1D385829C for ; Thu, 14 Mar 2024 12:46:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B1F1D385829C 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 B1F1D385829C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710420414; cv=none; b=i1uA9poolkaeesWi3JdecybPT4OGTAjbr4JzagQIzDSgMZ3xe8QDg7I8NQAPQE5c6iKEco1SFsSVkCugooH5GzjnJBsZPulwwgYa3iM8Z7Bwa0CNW4Ccnv7iAq10WLtU/ylNPoH8gQmEo5RjNCKAwWMGSplhUftdePWgXWxNvRU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710420414; c=relaxed/simple; bh=s8CNXPRLdb9hpPAW57quudPt6ePvYbdPcm0RJOHnnMQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ATJ7yF1dViT7u4DMng0YyKnEnaJqGP+Lhg+kbwH9o6yAVdoBAKsD3+9WgG6YsBF/L/64xd7qyeYjH6x80V/qArJRnb7yGvGQd6GQJPmAyWJ+MZ+Qsdedd+7oUtlslSwELkQCO2uZU1Wv9Hl+1M1M7taFK4O6jLVrHN8qsHMPIXM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6006a.ext.cloudfilter.net ([10.0.30.182]) by cmsmtp with ESMTPS id kiNprlNMuQr4SkkU0rPyZr; Thu, 14 Mar 2024 12:46:52 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id kkTzrumIfFRtykkTzrDtP8; Thu, 14 Mar 2024 12:46:51 +0000 X-Authority-Analysis: v=2.4 cv=F51RdLhN c=1 sm=1 tr=0 ts=65f2f1bb a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=K6JAEmCyrfEA:10 a=Qbun_eYptAEA:10 a=QyXUC8HyAAAA:8 a=ignPztrl6doauixu3kMA:9 a=QEXdDO2ut3YA:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=y1A5d7FVm/UabbDYXl/ZORG5KZ+8/QyVMOrVc8IsdIc=; b=DKEDMndDi7ewqS4W50TTk+bX9X yi3VNJzq/aVGhQQRsd7+D3jb6ACOnTUfQi37paomvu/88LS2b318JPz4RKvPOzpT/PeI+5g3JhAvb rDeDyzZdXKAB+s6nircRUq0dP; Received: from 97-122-82-115.hlrn.qwest.net ([97.122.82.115]:53598 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 1rkkTz-002i8E-0H; Thu, 14 Mar 2024 06:46:51 -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> X-Attribution: Tom Date: Thu, 14 Mar 2024 06:46:50 -0600 In-Reply-To: (Tankut Baris Aktemur's message of "Thu, 14 Mar 2024 10:36:21 +0000") Message-ID: <87v85pkmkl.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: 1rkkTz-002i8E-0H X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-82-115.hlrn.qwest.net (murgatroyd) [97.122.82.115]:53598 X-Source-Auth: tom+tromey.com X-Email-Count: 11 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfOAmhDHqlqG2IV+MYtErfCPjps/3Erhkb+hrW1BgqxRn6N0abwacOLtbX2M0hw+IBE9ungDn5M436srwbXBLyJDeXoCSpt80q7TP0i/NcSN1VmjMljVb Cas5gSvfyzvfq/AvloeguKIalofLQWEIUQvX7gekkY6GvXjYEh+gCGAXsuTwpCrrf/FNuoUJI91s+ZgfWchki8TaWH8r7FgNKY8= X-Spam-Status: No, score=-3015.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, 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 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 >>>>> Aktemur, Tankut Baris writes: > Probing needs to sends an address: Which address shall we use? The same a= ddress we > are given in the first encounter? And the length is 0. Then, what if th= e address > is bad, e.g. in an inaccessible region? But because the length is 0, sh= ould the target > send a success result or an error? From GDB's PoV, for probing, it doesn= 't matter, but=20 > from target's perspective, I think it creates an odd situation. 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: For any COMMAND not supported by the stub, an empty response (=E2=80= =98$#00=E2=80=99) should be returned. That way it is possible to extend the protocol. A newer GDB can tell if a packet is supported based on that response. Tom