Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@imgtec.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: Alan Hayward <Alan.Hayward@arm.com>,
	"gdb-patches@sourceware.org"	<gdb-patches@sourceware.org>,
	nd <nd@arm.com>
Subject: Re: [RFC] Replace regcache readonly flag with detached flag
Date: Tue, 18 Jul 2017 12:41:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.00.1707181340020.29593@tp.orcam.me.uk> (raw)
In-Reply-To: <8637a0r9mq.fsf@gmail.com>

On Thu, 13 Jul 2017, Yao Qi wrote:

> > Therefore I'd like to propose removing m_readonly_p and replacing it with:
> >
> >   /* Is this a detached cache?  A detached cache is not attached to a target.
> >      It is used for saving the target's register state (e.g, across an inferior
> >      function call or just before forcing a function return). A detached cache
> >      can be written to and read from, however the values will not be passed
> >      through to a target.
> >      Using the copy constructor or regcache_dup on a regcache will always
> >      create a detached regcache.  */
> >   bool m_detached_p;
> >
> > In most cases this is a 1:1 substitution of m_readonly_p for m_detached_p,
> > except it for the write functions, where we now allow writing to the
> > regcache buffers.
> 
> I am not sure this replacement is reasonable.  The regcache can be
> detached from target, and read-only or read-write.  The regcache can be
> attached to target, and read-write.  I can't think of a case that
> regcache is attached to target and read-only.

 As a matter of interest: what if the target is `core'?

  Maciej


  parent reply	other threads:[~2017-07-18 12:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05 14:54 Alan Hayward
2017-07-12 12:32 ` Alan Hayward
2017-07-12 21:52 ` Simon Marchi
2017-07-13 12:41   ` Alan Hayward
2017-07-13  9:04 ` Yao Qi
2017-07-14  9:21   ` Alan Hayward
2017-07-14 15:14     ` Yao Qi
2017-07-17 10:36       ` Alan Hayward
2017-07-18  9:47         ` Yao Qi
2017-07-18 11:01           ` Alan Hayward
2017-07-18 12:41   ` Maciej W. Rozycki [this message]
2017-07-18 13:09     ` Yao Qi

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=alpine.DEB.2.00.1707181340020.29593@tp.orcam.me.uk \
    --to=macro@imgtec.com \
    --cc=Alan.Hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@arm.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