Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: The REG_NUM and REGISTER_BYTES problem
Date: Sun, 02 Dec 2001 21:22:00 -0000	[thread overview]
Message-ID: <3C0B0C14.5040104@cygnus.com> (raw)
In-Reply-To: <20011202180304.A7998@nevyn.them.org>


> Well, how will this affect pseudo registers that we can provide but
> that the remote stub can not?  I'm pretty sure there are some.  Is the
> intent that such registers "should not" be fetched?

Hmm, yes, er, how can I put it?  Pseudo registers are a figment of GDB's 
vivid imagination?  Hmm, perhaphs not.

The theory is that core-GDB delegates _all_ responsibility for the 
resolution of such issues to the target architecture.  Or to put it 
another way, the target architecture is given enough rope to hang its 
self :-)

Yes, there are going to be registers that should not be fetched by 
remote.c from the target.  The trick is that register read/write should 
have already intercepted such register requests and mapped them onto 
real registers. (ok, I've simplified it a little :-)

Think of it as:

	user
	-> register read/write (maps cooked to raw)
	-> regcache read/write
	-> target fetch/store
	-> target.c
	-> map regnum to target regnum

provided register read/write is implemented correctly, the architecure 
is honky dorey.

To give a tangeable example, consider i386's MMX.  These 64 bit pseudo 
registers can be mapped onto 80 real FP registers.  The register 
read/write function map's MMX N register onto FP register M.

enjoy,
Andrew



      reply	other threads:[~2001-12-03  5:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-30 19:23 Andrew Cagney
2001-11-25 12:44 ` Andrew Cagney
2001-12-02 15:02 ` Daniel Jacobowitz
2001-12-02 21:22   ` 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=3C0B0C14.5040104@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=drow@mvista.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