This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: MIPS sign extension of addresses
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: Andrew Cagney <ac131313 at ges dot redhat dot com>, Fred Fish <fnf at intrinsity dot com>, binutils at sources dot redhat dot com, gdb at sources dot redhat dot com
- Date: Fri, 13 Sep 2002 09:36:46 +0200 (MET DST)
- Subject: Re: MIPS sign extension of addresses
- Organization: Technical University of Gdansk
- Reply-to: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
On Thu, 12 Sep 2002, Daniel Jacobowitz wrote:
> > >I've not yet checked, but are there fundamental reasons why bfd_vma
> > >or CORE_ADDR have to be unsigned?
> >
> > I don't think it will help. I think it will also hinder the situtation
> > where BFD/GDB are supporting multiple architectures - one signed and one
> > unsigned.
>
> Oh, Andrew's right. Signed CORE_ADDR isn't viable because other
> architectures have and assume an unsigned address space.
Because MIPS is a minority? Well, I can see some reason here, but care
has to be taken not to lose a sign with casts when operating on MIPS
addresses. Fortunately the positive and the negative ranges of addresses
are distinct on MIPS so you won't find normal code or data crossing a
boundary (that might lead to wrong results of compare operations).
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +