Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Alan Hayward <Alan.Hayward@arm.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>,
	 nd <nd@arm.com>
Subject: Re: [PATCH 1/7] Regcache: Subclass ptid functionality to target_regcache
Date: Wed, 23 Aug 2017 10:33:00 -0000	[thread overview]
Message-ID: <86mv6qr2u9.fsf@gmail.com> (raw)
In-Reply-To: <6AAAA989-5B31-4E54-963C-57F2B7452BD7@arm.com> (Alan Hayward's	message of "Thu, 17 Aug 2017 08:47:15 +0000")

Alan Hayward <Alan.Hayward@arm.com> writes:

> All ptid related functions are moved to target_regcache.
>

What is the rationale of this change?  The regcache is per-thread, even
it is disconnected from target.

> A regcache retains the ptid () method, which always returns -1.

ptid_t (-1) is minus_one_ptid, which has a special meaning.

> This ensures users can always test if a regcache is attached to a
> target, without needing to know if it is a target_regcache.

When do we need such test ("if a regcache is attached to a target")?

-- 
Yao (齐尧)


       reply	other threads:[~2017-08-23 10:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6AAAA989-5B31-4E54-963C-57F2B7452BD7@arm.com>
2017-08-23 10:33 ` Yao Qi [this message]
2017-08-23 13:24   ` Alan Hayward

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=86mv6qr2u9.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=Alan.Hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@arm.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