From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yUn5AxJgqGmDQBQAWB0awg (envelope-from ) for ; Wed, 04 Mar 2026 11:38:42 -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=kaKDY7Lr; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 070641E0DD; Wed, 04 Mar 2026 11:38:42 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no 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 6D20D1E089 for ; Wed, 04 Mar 2026 11:38:41 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 07E6D4BA23EF for ; Wed, 4 Mar 2026 16:38:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07E6D4BA23EF 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=kaKDY7Lr Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id E81354BA23C5 for ; Wed, 4 Mar 2026 16:36:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E81354BA23C5 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 E81354BA23C5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772642197; cv=none; b=uDtiSa41eBeKjRJLgPw3V+BTiyKtz/IgeY7lUL72g3ZMkeO7pu74yKeKYkBjeM63nWDtUKJT7+5nTIQjYSB2K0QIxHg8VrxbrpbLsZBZ9LemC7JldD6ivm57cWjPzCqNZg/4s+/lz0qMOjG7Wja5U3jf5JguCQ79r63DWUtqWeE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772642197; c=relaxed/simple; bh=or+rmfi1QrBrffeMAoxa77QqDYfBdemgO2ZhQO8HZr8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=XYjtCRrf4A7Hp7AS3/+N6Obx2sBxPD96HlVFn2LkmZns9OE6fN3KN8PsRoWuYEAqgv8hW96OybIFGdyEtHpjPzoKY+jtEegvYkqMSAiinuSO+GV1ii+BzH+vsoEJc8CJ8tDwFaa7AGMR5SZB2WaoImdAfURzpzOX4EcO68MJuHY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E81354BA23C5 Received: from eig-obgw-5003b.ext.cloudfilter.net ([10.0.29.155]) by cmsmtp with ESMTPS id xmamvpQPDCxrGxpDAvacQd; Wed, 04 Mar 2026 16:36:36 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id xpD7v3gZn2l0kxpD8vFqrh; Wed, 04 Mar 2026 16:36:34 +0000 X-Authority-Analysis: v=2.4 cv=UfRRSLSN c=1 sm=1 tr=0 ts=69a85f94 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=Yq5XynenixoA:10 a=ItBw4LHWJt0A:10 a=_ZhYKdCeAAAA:8 a=zstS-IiYAAAA:8 a=c1DDtc1dWKjjSO6DFuUA:9 a=uqOk3ZSnBfCTOznnrPA1: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-Subscribe: List-Post:List-Owner:List-Archive; bh=zeCmHA2gUCJFUB0ZD3s9GSa2RgTNYw3d+Vl1wEE0lT8=; b=kaKDY7LrDA26ABdg+gS5bvXeHV ZG7gKBunY41LwX2A4jBwX9Epz3hKt485EAoIfL74FBVQMhL9I1UJ+v7Gsuftc2pqcXil9fCuJGLE8 INkr+isHlPd1osoi/fHW+4hxN; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:35658 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vxpD7-00000003pYz-2kuQ; Wed, 04 Mar 2026 09:36:33 -0700 From: Tom Tromey To: simon.marchi@polymtl.ca Cc: gdb-patches@sourceware.org, Simon Marchi Subject: Re: [PATCH v2] gdb/corelow: mark bytes unavailable when reading from unavailable mapping In-Reply-To: <20260302032333.2287923-1-simon.marchi@polymtl.ca> (simon marchi's message of "Sun, 1 Mar 2026 22:23:05 -0500") References: <20260228022059.117785-1-simon.marchi@efficios.com> <20260302032333.2287923-1-simon.marchi@polymtl.ca> X-Attribution: Tom Date: Wed, 04 Mar 2026 09:36:32 -0700 Message-ID: <87ms0npn5b.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: 75.166.225.82 X-Source-L: No X-Exim-ID: 1vxpD7-00000003pYz-2kuQ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (bapiya) [75.166.225.82]:35658 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: MS4xfLzB3roXFzpOgtp7H96YgIkDj4TLCp4zSyZwmQw3+Tme2NP5xBPx9Nhi8oqkkiw1WqDCw+jJz3feih8lB220a/UdIrndh861n6FAaVrfBrczVvBhxztw 9UwLs31KWr719afbBsvSA8lxacvGw5V+hFy7Rc04Ug0BGs+CZjBrN1lEDltIJHTIKJmTGToVEECgY3c+Idp3HJ4+MN2fuQPKKbo= 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 >>>>> "Simon" == simon marchi writes: Simon> The main motivation for this change is to nicely support "lightweight" Simon> core files on ROCm (more on this below), but I think that the change Simon> also makes sense for regular core files. FWIW this all makes sense to me. Simon> diff --git a/gdb/corelow.c b/gdb/corelow.c Simon> index a28a707c293a..57d05504fa3c 100644 Simon> --- a/gdb/corelow.c Simon> +++ b/gdb/corelow.c Simon> @@ -1470,7 +1470,8 @@ core_target::xfer_partial (enum target_object object, const char *annex, Simon> if (xfer_status == TARGET_XFER_OK) Simon> return TARGET_XFER_OK; Simon> - return TARGET_XFER_E_IO; Simon> + *xfered_len = len; Simon> + return TARGET_XFER_UNAVAILABLE; Simon> } Simon> } Just before this is a comment ending with If that fails, but the access is within an unavailable region, then the access itself should fail. */ but perhaps this could be reworded to not say "fail" but something about unavailability. Though honestly this is kind of a nit since the code speaks for itself. Anyway I think this is good. Approved-By: Tom Tromey Tom