Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: David Taylor <taylor@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] regcache.c (register_fetched) + related changes
Date: Fri, 02 Mar 2001 11:49:00 -0000	[thread overview]
Message-ID: <3A9FF8B5.E88307BD@cygnus.com> (raw)
In-Reply-To: <200103020058.TAA18595@texas.cygnus.com>

> Example, for this processor, the frame pointer is a pseudo register.
> The frame pointer is two random 8 bit registers -- 16 bits.  The
> hardware does *NOT* have the ability to operate on those registers as
> a pair.  It cannot load the frame pointer, it cannot store the frame
> pointer, it can only load or store one of the 8 bit registers at a
> time.
> 
> Since the compiler writer simply chose two adjacent 8 bit registers,
> in the right order, there is no need, in REGISTER_BYTES to have a
> special place for the fp and then copy things back and forth --
> instead the value goes directly into the two underlying real
> registers.
> 
> So, when the fp is fetched, there is a need to mark the underlying
> real registers (i.e., registers in the range [0,NUM_REGS) as fetched.

Yes.

That is a design flaw in the way GDB currently handles FP and other
pseudo registers.  At first sight you think that something like
write_pseudo() can be implemented as just:

	read_register_gen(..., first half);
	read_register_gen(..., second half);

Unfortunatly, because of some broken code in the core of gdb still also
need to allocate space in the regcache and pull all sorts of nasty
hacks.

The idea of separating a core-gdb register write from the raw register
cache (so that write_pseudo() can do a scatter.  Should fix that.  I was
planning on such a change as part of binding everything to a frame,
however, that could be separated out.

	Andrew


  parent reply	other threads:[~2001-03-02 11:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-01 16:59 David Taylor
2001-03-02  9:06 ` Andrew Cagney
2001-03-02 11:49 ` Andrew Cagney [this message]
2001-03-13  8:52   ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2001-03-01 10:34 David Taylor
2001-03-01 14:07 ` Andrew Cagney
2001-02-28 13:14 David Taylor
2001-02-28 15:17 ` Andrew Cagney
2001-02-28 16:01   ` Andrew Cagney
2001-02-28 18:27   ` Andrew Cagney
2001-02-27 15:27 David Taylor
2001-02-27 14:25 David Taylor
2001-02-27 14:48 ` Michael Snyder
2001-02-27 15:21 ` Andrew Cagney
2001-02-27 17:40 ` 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=3A9FF8B5.E88307BD@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=taylor@cygnus.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