From: Daniel Jacobowitz <drow@false.org>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: make sim interface use gdbarch methods for collect/supply
Date: Thu, 01 Jul 2004 02:48:00 -0000 [thread overview]
Message-ID: <20040701024822.GA5875@nevyn.them.org> (raw)
In-Reply-To: <vt2eknxasm7.fsf@zenia.home>
On Wed, Jun 30, 2004 at 12:00:16PM -0500, Jim Blandy wrote:
> Daniel Jacobowitz <drow@false.org> writes:
>
> > On Wed, Jun 30, 2004 at 10:47:23AM -0500, Jim Blandy wrote:
> > >
> > > At the moment, remote-sim.c's gdbsim_fetch_register and
> > > gdbsim_store_register functions assume that the simulator's register
> > > set (as visible via sim_fetch_register and sim_store_register)
> > > corresponds exactly to GDB's raw register set. This patch is meant to
> > > remove that assumption.
> > >
> > > Tested on i686-pc-linux-gnu x powerpc-eabispe (sim).
> >
> > We've got a whole lot of new mechanism for describing register sets.
> > Can't you use that instead of adding new supply/collect routines?
>
> I'd love to use some existing mechanism, but I couldn't see how to
> apply what I know of to this problem. Can you give me a pointer?
>
> If you mean the regset stuff: the sim doesn't present its registers in
> terms of a single structure that one could pass to a
> supply_regset_ftype or collect_regset_ftype value; you make one call
> to a sim function to transfer each register.
The interface may need some surgery to do it, but the sim's registers
are conceptually a regset, aren't they? We could collect each register
from the sim into a buffer and write a "struct regset" describing that.
This could happen in an arch-independent way in remote-sim, and then
the regset be provided by the target architecture.
> I think what you're getting at is that SIM_COLLECT_REGISTER and
> SIM_SUPPLY_REGISTER will in general have to re-implement some of the
> raw/pseudo mapping. I agree that that's unfortunate, but it's
> inherent in the design: we can only collect and supply raw register
> values, and our raw regcache layout is not necessarily the same as the
> sim's register layout.
No, what I'm getting at is that I'd rather the number of interfaces for
accessing registers went down than up! I want to standardize on using
the regset interface, because it's the most flexible.
--
Daniel Jacobowitz
next prev parent reply other threads:[~2004-07-01 2:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-30 15:48 Jim Blandy
2004-06-30 15:53 ` Daniel Jacobowitz
2004-06-30 17:00 ` Jim Blandy
2004-07-01 2:48 ` Daniel Jacobowitz [this message]
2004-07-01 17:23 ` Jim Blandy
2004-07-01 17:31 ` Daniel Jacobowitz
2004-07-01 18:45 ` Jim Blandy
2004-07-01 18:48 ` Daniel Jacobowitz
2004-07-02 15:39 ` Andrew Cagney
2004-07-06 15:38 ` Daniel Jacobowitz
2004-07-06 17:10 ` Jim Blandy
2004-07-06 17:17 ` Daniel Jacobowitz
2004-07-15 18:35 ` Jim Blandy
2004-07-16 15:01 ` Daniel Jacobowitz
2004-07-06 17:43 ` Andrew Cagney
2004-07-06 18:31 ` Daniel Jacobowitz
2004-07-02 15:19 ` Andrew Cagney
2004-07-02 22:13 ` Jim Blandy
2004-07-06 15:18 ` 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=20040701024822.GA5875@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@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