Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Philipp Rudo <prudo@linux.vnet.ibm.com>, gdb-patches@sourceware.org
Cc: Omair Javaid <omair.javaid@linaro.org>,
	Yao Qi <qiyaoltc@gmail.com>,
	arnez@linux.vnet.ibm.com
Subject: Re: [RFC PATCH v5 3/9] Add scoped_restore_regcache_ptid
Date: Sat, 17 Mar 2018 18:08:00 -0000	[thread overview]
Message-ID: <31613f15-ac19-725e-b2de-404133793d96@simark.ca> (raw)
In-Reply-To: <20180312153115.47321-4-prudo@linux.vnet.ibm.com>

On 2018-03-12 11:31 AM, Philipp Rudo wrote:
> When a target and its target beneath use different ptids to identify a
> thread the regcaches ptid has to be set/restored when calls are passed down
> to the target beneath to e.g. fetch_registers.  Add a scoped_restore to
> simplify this.

Though I don't understand yet why this is needed (I'll find out when reading
the following patches), the implementation looks ok.

I don't think this is an issue (at least for now), but there is this observer
"thread_ptid_changed" that indicates when a thread changes ptid.  If this
observer is triggered while we have temporarily changed a regcache's ptid,
I guess we could miss updating a regcache's ptid, as
scoped_restore_regcache_ptid will reset it to the old ptid.  It's probably
not a problem but I think it's good to be aware of this.

Simon


  reply	other threads:[~2018-03-17 18:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 15:31 [RFC v5 0/9] Add support for Linux kernel debugging Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 7/9] Add privileged registers for s390x Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 5/9] Add kernel module support for linux-kernel target Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 9/9] Add S390 " Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 2/9] Add libiberty/concat styled concat_path function Philipp Rudo
2018-03-16  2:47   ` Simon Marchi
2018-03-12 15:31 ` [RFC PATCH v5 3/9] Add scoped_restore_regcache_ptid Philipp Rudo
2018-03-17 18:08   ` Simon Marchi [this message]
2018-03-12 15:31 ` [RFC PATCH v5 4/9] Add basic Linux kernel support Philipp Rudo
2018-03-13 14:09   ` Kamil Rytarowski
2018-03-14  9:48     ` Philipp Rudo
2018-03-14 23:38       ` Kamil Rytarowski
2018-03-19  0:11   ` Simon Marchi
2018-03-12 15:31 ` [RFC PATCH v5 6/9] Add commands for linux-kernel target Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 8/9] Link frame_info to thread_info Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 1/9] Convert substitute_path_component to C++ Philipp Rudo
2018-03-16  2:15   ` Simon Marchi
2018-03-17 20:11     ` 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=31613f15-ac19-725e-b2de-404133793d96@simark.ca \
    --to=simark@simark.ca \
    --cc=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=omair.javaid@linaro.org \
    --cc=prudo@linux.vnet.ibm.com \
    --cc=qiyaoltc@gmail.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