Use the address mask with addresses for SREC, etc.

Jim Blandy jimb@codesourcery.com
Wed Jul 25 17:53:00 GMT 2007


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?



More information about the Gdb-patches mailing list