From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: RFC: Unpredictable register set operations
Date: Wed, 16 Jul 2003 03:21:00 -0000 [thread overview]
Message-ID: <20030716032118.GA13750@nevyn.them.org> (raw)
In-Reply-To: <3F14BC94.4070405@redhat.com>
On Tue, Jul 15, 2003 at 10:46:44PM -0400, Andrew Cagney wrote:
> >I'm sure this has come up before, but I couldn't find a discussion anywhere
> >so I'll just have to ask again...
>
> It come up before:
> http://sources.redhat.com/ml/gdb/2003-06/msg00108.html
>
> >Consider PowerPC and the $ps register (MSR). When debugging a kernel or
> >embedded application, GDB has pretty complete control (?) over this
> >register. In GNU/Linux userspace, however, only two bits of it can be
> >set. The rest are read-only.
> >
> >So what happens if you "set $ps = 0"? Well, the right thing happens, but
> >until the next time the target stops "print $ps" will print 0. Which is
> >not
> >actually the value of the $ps register.
> >
> >Here's the options that I see:
> > - Ignore and document this.
> > - Refetch registers after storing them.
> > - Invalidate registers for lazy re-fetch after storing them.
> > - Add a target hook for might-be-volatile registers, and invalidate
> > only those registers after storing them - or don't cache them at
> > all.
> >
> >Thoughts? Is this a problem worth fixing?
>
> This is a straight bug. The register cache should be marked as invalid
> after the store. What puzzles me is why store.exp doesn't tickle this,
> or is this a hangover from lval_register vs lval_reg_frame_relative?
Where's the invalidation supposed to happen presently? Perhaps I need
to retest.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-07-16 3:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-15 22:09 Daniel Jacobowitz
2003-07-15 22:27 ` Kevin Buettner
2003-07-15 22:29 ` Doug Evans
2003-07-16 2:46 ` Andrew Cagney
2003-07-16 3:21 ` Daniel Jacobowitz [this message]
2003-07-21 16:48 ` Daniel Jacobowitz
2003-08-05 5:13 ` Andrew Cagney
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=20030716032118.GA13750@nevyn.them.org \
--to=drow@mvista.com \
--cc=ac131313@redhat.com \
--cc=gdb@sources.redhat.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