Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: Nick Duffek <nsd@redhat.com>,
	ezannoni@cygnus.com, gdb-patches@sources.redhat.com
Subject: Re: [RFA] findvar.c: support LOC_BASEREG[_ARG] on Harvard archs
Date: Mon, 16 Jul 2001 14:16:00 -0000	[thread overview]
Message-ID: <np3d7wzi86.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <3B535097.5040106@cygnus.com>

Andrew Cagney <ac131313@cygnus.com> writes:
> > Index: gdb/findvar.c
> > ===================================================================
> > diff -up gdb/findvar.c gdb/findvar.c> --- gdb/findvar.c	Mon Jul 16 12:41:21 2001
> > +++ gdb/findvar.c	Mon Jul 16 12:39:40 2001
> > @@ -612,9 +612,10 @@ addresses have not been bound by the dyn
> >      case LOC_BASEREG_ARG:
> >        {
> >  	char *buf = (char*) alloca (MAX_REGISTER_RAW_SIZE);
> > +	memset (buf, 0, MAX_REGISTER_RAW_SIZE);
> >  	get_saved_register (buf, NULL, NULL, frame, SYMBOL_BASEREG (var),
> >  			    NULL);
> > -	addr = extract_address (buf, REGISTER_RAW_SIZE (SYMBOL_BASEREG (var)));
> > +	addr = POINTER_TO_ADDRESS (builtin_type_void_data_ptr, buf);
> >  	addr += SYMBOL_VALUE (var);
> >  	break;
> 
> 
> FYI, I think this change will break the MIPS o64 ABI in big-endian mode.
> Under that ABI, 8 byte registers are used (and saved on the stack) but 
> sizeof (void*) == 4.  If I'm reading the above change correctly, 
> pointer_to_address() will always extract the value from the first 4 
> bytes of of the register when, for o64/BE, it should be using the second 
> 4 bytes.

That's right, it will.  :(

Probably using register_value and value_as_pointer is best, then.


      parent reply	other threads:[~2001-07-16 14:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-16 10:13 Nick Duffek
2001-07-16 11:29 ` Jim Blandy
2001-07-16 14:35   ` Nick Duffek
     [not found]     ` <npsnfwy0u8.fsf@zwingli.cygnus.com>
2001-07-16 15:49       ` Andrew Cagney
2001-07-16 15:59         ` Jim Blandy
2001-07-16 16:13         ` Nick Duffek
2001-07-16 15:59       ` Nick Duffek
2001-07-16 16:09         ` Andrew Cagney
2001-07-16 16:13           ` Nick Duffek
2001-07-16 16:17           ` Nick Duffek
     [not found] ` <3B535097.5040106@cygnus.com>
2001-07-16 14:16   ` Jim Blandy [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=np3d7wzi86.fsf@zwingli.cygnus.com \
    --to=jimb@zwingli.cygnus.com \
    --cc=ac131313@cygnus.com \
    --cc=ezannoni@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=nsd@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