Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: simon.marchi@polymtl.ca
Cc: gdb-patches@sourceware.org,  Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH v2] gdb/corelow: mark bytes unavailable when reading from unavailable mapping
Date: Wed, 04 Mar 2026 09:36:32 -0700	[thread overview]
Message-ID: <87ms0npn5b.fsf@tromey.com> (raw)
In-Reply-To: <20260302032333.2287923-1-simon.marchi@polymtl.ca> (simon marchi's message of "Sun, 1 Mar 2026 22:23:05 -0500")

>>>>> "Simon" == simon marchi <simon.marchi@polymtl.ca> 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@tromey.com>

Tom

  parent reply	other threads:[~2026-03-04 16:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-28  2:20 [PATCH] " Simon Marchi
2026-03-02  3:23 ` [PATCH v2] " simon.marchi
2026-03-02 13:00   ` Eli Zaretskii
2026-03-02 15:49     ` Aktemur, Tankut Baris
2026-03-02 20:01       ` Simon Marchi
2026-03-02 19:54     ` Simon Marchi
2026-03-04 16:38     ` Tom Tromey
2026-03-04 16:36   ` Tom Tromey [this message]
2026-03-09 18:37     ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ms0npn5b.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox