Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb@sourceware.org
Subject: Re: CORE_ADDR representation
Date: Thu, 18 Feb 2010 13:53:00 -0000	[thread overview]
Message-ID: <20100218135342.GA11674@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20100218134137.GA17163@caradoc.them.org>

On Thu, 18 Feb 2010 14:41:41 +0100, Daniel Jacobowitz wrote:
> On Thu, Feb 18, 2010 at 11:34:04AM +0100, Jan Kratochvil wrote:
> > these "& mask" parts can be removed.  This masking was there already before
> > start of the PIE(+OSX) patches.
> 
> I don't understand.  How can the masking possibly be removed?  If you
> don't mask, 0x50000000 + 0x40000000 == 0x90000000 and that's not going
> to work on MIPS where we need 0xffffffff90000000.

OK, my mistake.

(You wrote somewhere MIPS32 uses only lower 2GB, expected higher 2GB is used
for some special purposes when you care about it and those lower and higher
2GB do not mix.)


> This won't show the same problem, you'll need to use mips-elf instead.
> MIPS Linux places application code below 0x80000000 exclusively; MIPS
> ELF (at least some versions) starts applications in KSEG0, at
> 0x80000000.

OK, that explains those "lower 2GB" on MIPS32.


There can be CORE_ADDR-as-address which would be always zero-extended and
CORE_ADDR-as-displacement which would be always sign-extended.  Having them as
scalar types will not sanity check the code is right during compilation but it
would not need replacing all CORE_ADDR '+'/'-'es by functions calls as in:
	http://sourceware.org/ml/gdb-patches/2010-02/msg00415.html
	(the 200KB patch with addr_add_offset&.co.)


Thanks,
Jan


      reply	other threads:[~2010-02-18 13:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18  4:44 Daniel Jacobowitz
2010-02-18  5:42 ` Stan Shebs
2010-02-18 14:11   ` Daniel Jacobowitz
2010-02-18 23:04     ` Tom Tromey
2010-02-18 10:18 ` Mark Kettenis
2010-02-18 13:43   ` Daniel Jacobowitz
2010-02-19 19:27     ` Tom Tromey
2010-02-18 10:34 ` Jan Kratochvil
2010-02-18 13:41   ` Daniel Jacobowitz
2010-02-18 13:53     ` Jan Kratochvil [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=20100218135342.GA11674@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb@sourceware.org \
    /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