This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Use the address mask with addresses for SREC, etc.
- From: Jim Blandy <jimb at codesourcery dot com>
- To: "Maciej W. Rozycki" <macro at mips dot com>
- Cc: gdb-patches at sourceware dot org, Nigel Stephens <nigel at mips dot com>, Chris Dearman <chris at mips dot com>, "Maciej W. Rozycki" <macro at linux-mips dot org>
- Date: Wed, 25 Jul 2007 09:47:42 -0700
- Subject: Re: Use the address mask with addresses for SREC, etc.
- References: <Pine.LNX.4.61.0707241740390.20726@perivale.mips.com>
It's my understanding that addresses are signed on MIPS architectures,
and thus 32-bit SREC files are only capable of addressing locations
0xffffffff80000000 -- 0x000000007fffffff. And that the issue you're
fixing here arises from BFD handing you addresses read from an SREC
file (which is using 32-bit addresses) in the 0x80000000 -- 0xffffffff
range. Is that right?
I'm not too happy with complicating code in GDB because BFD is
providing it with the wrong addresses. I have to imagine the same
thing would happen elsewhere. When BFD reads the SREC file, does it
have any idea that it's a MIPS SREC file? It looks like
bfd_get_sign_extend_vma doesn't know about MIPS SREC targets; would
fixing that, and then bfd/srec.c, help us get the right addresses into
the BFD?