From: Andrew Cagney <ac131313@redhat.com>
To: "John S. Yates, Jr." <jyates@netezza.com>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: register != memory
Date: Mon, 09 Jun 2003 18:33:00 -0000 [thread overview]
Message-ID: <3EE4D308.1060308@redhat.com> (raw)
In-Reply-To: <014401c32ea0$18f21830$1400a8c0@astral>
> Foremost among these is gdb's modeling of target
> registers. The model seems to presume vanilla
> registers (e.g. gprs, fprs, pc, etc).
After writing to a register, everything is invalidated. Is this not
happening?
Andrew
> To provide the low level access needed by many
> of our developers I have exposed many kernel-only
> registers via g, G, and P. Sadly the results
> leave something to be desired because gdb seems
> to believe that it can employ a memory-like model
> for caching registers.
>
> This breaks down when the user sets one of these
> kernel-only registers. I have numerous examples
> where this results in a corrupted register cache:
> - readonly registers
> - bits that always read as zero or one
> - write-one to clear bits
>
> Since the G message seems to be associated with
> establishing thread state I simply ignore values
> for any register that is not multiplexed by the
> thread scheduler.
>
> The P message is more of a problem. Even when
> returned an error (e.g. an attempt to modify a
> readonly register) gdb reports the error to the
> user but still updates its register cache.
>
> A clean solution might be to allow an alternate
> reply to a P message: Rval supplying the value
> to be encached.
>
> /john
>
>
prev parent reply other threads:[~2003-06-09 18:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-09 15:59 John S. Yates, Jr.
2003-06-09 16:04 ` Daniel Jacobowitz
2003-06-09 18:33 ` Andrew Cagney [this message]
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=3EE4D308.1060308@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=jyates@netezza.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