This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: path for gdb/dwarf2read.c, support 16-bit targets in dwarf-2
Jim Blandy wrote:
> > o it gives the user a better experience:
> > (gdb) x/i 0x800000200
> > 0x800000200 <start>: ldi $1, 0
> > (gdb) print &start
> > $1 = 0x800000200
> > vs
> > x/i 0xffffffff800000200
> > 0xffffffff800000200 <start>: ldi $1, 0
> > (gdb) print &start
> > $2 = 0xffffffff800000200
> > at the cost of carrying around wrong
> > information and complicating the target.
>
> But which is the correct address --- 0x0000000080000200, or
> 0xffffffff80000200?
That is target dependant but well defined.
The MIPS ISA/ABI is carefully defined so MIPS2 on MIPS3 et.al. ensures
that the upper 32 bits is signextended from the low 32 bits.
Andrew