From: Daniel Jacobowitz <drow@false.org>
To: "Maciej W. Rozycki" <macro@mips.com>
Cc: gdb-patches@sourceware.org, "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: Target-specific thread switching backend
Date: Wed, 05 Dec 2007 15:22:00 -0000 [thread overview]
Message-ID: <20071205144031.GA19944@caradoc.them.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0712051240360.26738@perivale.mips.com>
On Wed, Dec 05, 2007 at 02:13:18PM +0000, Maciej W. Rozycki wrote:
> Hello,
>
> In preparation for submitting support for the MDI target I propose the
> following enhancement to target_switch_to_thread(). The MDI implements a
> multi-threaded target which remembers the currently selected thread within
> itself. All the operations that have thread-local scope, such as
> accessing of the CPU registers, use that thread identifier. Therefore I
> think it is reasonable to propagate the thread-switch event down to the
> target, which is what the following change implements.
I don't see why this is necessary, or how it is safe. At every
operation, the requested thread should be indicated by inferior_ptid
(or a ptid_t argument in some cases). And switch_to_thread is usually
but not always called when inferior_ptid is changed, e.g.
regcache_raw_read.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-12-05 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-05 14:26 Maciej W. Rozycki
2007-12-05 15:22 ` Daniel Jacobowitz [this message]
2007-12-05 16:07 ` Maciej W. Rozycki
2007-12-05 18:37 ` Daniel Jacobowitz
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=20071205144031.GA19944@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=macro@linux-mips.org \
--cc=macro@mips.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