From: Pedro Alves <pedro@palves.net>
To: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>,
Tom Tromey <tromey@adacore.com>,
Andrew Burgess <aburgess@redhat.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v4 6/6] Use correct inferior in Inferior.read_memory et al
Date: Tue, 18 Jul 2023 13:26:02 +0100 [thread overview]
Message-ID: <0014b1a1-09bd-07da-3463-863dec0f0d91@palves.net> (raw)
In-Reply-To: <DM4PR11MB73039AD0722418C95F2F4530C438A@DM4PR11MB7303.namprd11.prod.outlook.com>
On 2023-07-18 09:48, Aktemur, Tankut Baris wrote:
> On Monday, July 17, 2023 8:16 PM, Pedro Alves wrote:
>> As for pointing inferior_ptid to a pid-ptid, I don't think it is strange,
>> we do it in other places. Note that gdbserver handles memory accesses
>> in a similar "without a thread" way, see:
>>
>> commit 7f8acedeebe295fc8cc1d11ed971cbfc1942618c
>> gdbserver: track current process as well as current thread
>>
>> Note how gdb_read_memory uses set_desired_process, and then switch_to_process
>> switches current_thread to nullptr.
>
> On a related topic, would you mind commenting on
>
> https://sourceware.org/pipermail/gdb-patches/2023-June/200347.html ?
>
> In the downstream debugger of Intel, we see a similar problem. For a
> certain address space, a thread context is needed.
Ah.
> Are you in more favor
> of letting the core leave the thread unset and making the targets
> responsible for setting the thread context?
Hmm, I don't see how that would work -- how would the target know which
is the right thread to use?
But let's move the discussion there. I'll reply to your patch with my
questions.
next prev parent reply other threads:[~2023-07-18 12:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 17:06 [PATCH v4 0/6] Fix some Python Inferior methods Tom Tromey
2023-07-14 17:06 ` [PATCH v4 1/6] Minor cleanups in py-inferior.exp Tom Tromey
2023-07-14 17:06 ` [PATCH v4 2/6] Refactor py-inferior.exp Tom Tromey
2023-07-14 17:06 ` [PATCH v4 3/6] Rename Python variable in py-inferior.exp Tom Tromey
2023-07-14 17:06 ` [PATCH v4 4/6] Remove obsolete comment from gdbthread.h Tom Tromey
2023-07-14 17:06 ` [PATCH v4 5/6] Introduce scoped_restore_current_inferior_for_memory Tom Tromey
2023-07-14 17:06 ` [PATCH v4 6/6] Use correct inferior in Inferior.read_memory et al Tom Tromey
2023-07-15 13:31 ` Andrew Burgess
2023-07-17 17:12 ` Tom Tromey
2023-07-17 18:15 ` Pedro Alves
2023-07-17 18:44 ` Tom Tromey
2023-07-18 12:20 ` [PATCH] Fix gdb.Inferior.read_memory without execution (PR dap/30644) (was: Re: [PATCH v4 6/6] Use correct inferior in Inferior.read_memory et al) Pedro Alves
2023-07-18 17:25 ` [PATCH] Fix gdb.Inferior.read_memory without execution (PR dap/30644) Tom Tromey
2023-07-19 13:14 ` Pedro Alves
2023-07-18 8:48 ` [PATCH v4 6/6] Use correct inferior in Inferior.read_memory et al Aktemur, Tankut Baris
2023-07-18 12:26 ` Pedro Alves [this message]
2023-07-18 13:19 ` Aktemur, Tankut Baris
2023-07-14 18:09 ` [PATCH v4 0/6] Fix some Python Inferior methods 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=0014b1a1-09bd-07da-3463-863dec0f0d91@palves.net \
--to=pedro@palves.net \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tankut.baris.aktemur@intel.com \
--cc=tromey@adacore.com \
/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).