Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: palves@redhat.com
Cc: ppluzhnikov@gmail.com, gdb-patches@sourceware.org,
	ppluzhnikov@google.com,        macro@linux-mips.org
Subject: Re: [patch] Fix BZ15121 -- x/a broken for addresses in shared libraries
Date: Thu, 10 Sep 2015 14:33:00 -0000	[thread overview]
Message-ID: <201509101433.t8AEX5Cw008716@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <55F19100.30600@redhat.com> (message from Pedro Alves on Thu, 10	Sep 2015 15:17:36 +0100)

> Date: Thu, 10 Sep 2015 15:17:36 +0100
> From: Pedro Alves <palves@redhat.com>
> 
> On 09/06/2015 09:03 PM, Paul Pluzhnikov wrote:
> 
> > index 91bf49e..0624b90 100644
> > --- a/gdb/value.c
> > +++ b/gdb/value.c
> > @@ -2927,7 +2927,13 @@ unpack_pointer (struct type *type, const gdb_byte *valaddr)
> >  {
> >    /* Assume a CORE_ADDR can fit in a LONGEST (for now).  Not sure
> >       whether we want this to be true eventually.  */
> > -  return unpack_long (type, valaddr);
> > +  LONGEST ret = unpack_long (type, valaddr);
> > +  int len = TYPE_LENGTH (type);
> > +  if (sizeof (CORE_ADDR) > len && ret < 0) {
> > +    /* Don't sign-extend 32-bit pointer.  BZ 15121.  */
> > +    return ret & ((1UL << (8 * len)) - 1);
> > +  }
> > +  return ret;
> >  }
> 
> Do we need to keep sign-extending on MIPS?  Adding Maciej.

I'm pretty sure you do.


  parent reply	other threads:[~2015-09-10 14:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-06 20:03 Paul Pluzhnikov
     [not found] ` <55F19100.30600@redhat.com>
2015-09-10 14:33   ` Mark Kettenis [this message]
2015-09-10 15:00     ` Paul Pluzhnikov
2015-09-10 15:07       ` Pedro Alves
2015-09-10 15:19         ` Maciej W. Rozycki
2015-09-10 15:02     ` Maciej W. Rozycki
2015-09-12 21:41       ` Paul Pluzhnikov
2015-09-12 21:56         ` Maciej W. Rozycki

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=201509101433.t8AEX5Cw008716@glazunov.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sourceware.org \
    --cc=macro@linux-mips.org \
    --cc=palves@redhat.com \
    --cc=ppluzhnikov@gmail.com \
    --cc=ppluzhnikov@google.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