Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: ac131313@cygnus.com, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Fix sparc-*-linux register fetching/storing
Date: Sat, 10 Nov 2001 16:42:00 -0000	[thread overview]
Message-ID: <20011125120839.A15648@nevyn.them.org> (raw)
In-Reply-To: <20011125120250.D4087@devserv.devel.redhat.com>

On Sun, Nov 25, 2001 at 12:02:50PM -0500, Jakub Jelinek wrote:
> On Sun, Nov 25, 2001 at 11:54:46AM -0500, Daniel Jacobowitz wrote:
> > Well, regcache_collect is the only approved interface to the contents
> > of registers[] for one thing.
> 
> Even in the routine where half of it is direct registers[] setting?
> If that is rewritten, surely it makes sense to access sp that way too.

Yes.  Accessing registers[] is deprecated.

> > It would also prevent the need for the
> > cast (although you'd have to clear the upper half of the variable
> > first and make sure to stuff it into the low bytes since we're
> > big-endian.  Ew.).
> > 
> > Andrew?  Do we need to have a regcache_collect_core_addr, to sign
> > extend and shift appropriately for each architecture?
> 
> Without such routine the code would be very ugly:
> CORE_ADDR sp = 0;
> regcache_collect (SP_REGNUM, ((char *)&sp) + sizeof(CORE_ADDR) - REGISTER_RAW_SIZE(SP_REGNUM));

I guess we do, then :)  I'll wait for Andrew's thoughts, this is his
turf.  But other than this, your patch looks good.  Since Sparc is
listed as maintenance only (i.e. no active maintainer), you can go
ahead and commit it, I think; we'll clean up the registers[] stuff
later.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2001-11-25 17:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-10  9:20 Jakub Jelinek
2001-11-10 13:03 ` Daniel Jacobowitz
2001-11-10 16:27   ` Jakub Jelinek
2001-11-10 16:35     ` Daniel Jacobowitz
2001-11-10 16:41       ` Jakub Jelinek
2001-11-10 16:42         ` Daniel Jacobowitz [this message]
2001-11-12 10:39       ` Andrew Cagney
2001-11-26  9:18         ` Andrew Cagney
2001-11-26 12:04         ` Daniel Jacobowitz
2001-11-12 18:40           ` Daniel Jacobowitz
2001-11-26 12:34           ` Andrew Cagney
2001-11-12 19:11             ` Andrew Cagney
2001-11-13  8:19             ` Daniel Jacobowitz
2001-11-26 12:43               ` Daniel Jacobowitz
2001-11-26 13:19               ` Andrew Cagney
2001-11-13  8:28                 ` Andrew Cagney
2001-11-26  9:08     ` Andrew Cagney
2001-11-12 10:04       ` 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=20011125120839.A15648@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jakub@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