public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Simon Marchi <simark@simark.ca>
Cc: Tom Tromey <tromey@adacore.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH v2 5/6] Introduce scoped_restore_current_inferior_for_memory
Date: Thu, 13 Jul 2023 08:01:53 -0600	[thread overview]
Message-ID: <87o7kfq59q.fsf@tromey.com> (raw)
In-Reply-To: <d2da3a93-f9eb-77f2-0651-00080caf8ed8@simark.ca> (Simon Marchi's message of "Wed, 12 Jul 2023 16:35:06 -0400")

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

Simon> On 7/11/23 12:14, Tom Tromey via Gdb-patches wrote:
>> This introduces a new class,
>> scoped_restore_current_inferior_for_memory, and arranges to use it in
>> a few places.  This class is intended to handle setting up and
>> restoring the various globals that are needed to read or write memory
>> -- but without invalidating the frame cache.

Simon> OOC, why is it important to avoid invalidating the frame cache?  If
Simon> there's a good reason, it should probably be mentioned here or in a
Simon> comment.

It depends on the caller, but in the case of the Python APIs, it is so
they can be used from an unwinder.  I'll add some comments in there.

Tom

  reply	other threads:[~2023-07-13 14:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11 16:14 [PATCH v2 0/6] Fix some Python Inferior methods Tom Tromey
2023-07-11 16:14 ` [PATCH v2 1/6] Minor cleanups in py-inferior.exp Tom Tromey
2023-07-11 16:14 ` [PATCH v2 2/6] Refactor py-inferior.exp Tom Tromey
2023-07-11 16:14 ` [PATCH v2 3/6] Rename Python variable in py-inferior.exp Tom Tromey
2023-07-14 16:34   ` Pedro Alves
2023-07-11 16:14 ` [PATCH v2 4/6] Remove obsolete comment from gdbthread.h Tom Tromey
2023-07-11 16:14 ` [PATCH v2 5/6] Introduce scoped_restore_current_inferior_for_memory Tom Tromey
2023-07-12 20:35   ` Simon Marchi
2023-07-13 14:01     ` Tom Tromey [this message]
2023-07-14 16:33   ` Pedro Alves
2023-07-11 16:14 ` [PATCH v2 6/6] Use correct inferior in Inferior.read_memory et al Tom Tromey
2023-07-14 16:48   ` Pedro Alves
2023-07-14 16:56     ` Pedro Alves

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=87o7kfq59q.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).