mipsbe solib event breakpoint endian?
Daniel Jacobowitz
drow@mvista.com
Thu Jul 10 15:09:00 GMT 2003
On Thu, Jul 10, 2003 at 11:06:01AM -0400, Kris Warkentin wrote:
> Finally got around to chasing this again and I've found the problem. I'm
> hoping someone might be able to explain why I'm seeing what I'm seeing.
>
> GDB-5.2.1 targetting QNX MipsBE:
> Breakpoint 4, enable_break () at ../../gdb/solib-svr4.c:939
> 939 if (!load_addr_found)
> (top) n
> 940 load_addr = read_pc () - tmp_bfd->start_address;
> (top) p read_pc()
> $1 = 1882417036
> (top) p /x read_pc()
> $2 = 0x7033678c
> (top)
>
>
> GDB-HEAD targetting QNX MipsBE:
> Breakpoint 3, enable_break () at ../../gdb/solib-svr4.c:1039
> 1039 load_addr = read_pc () - tmp_bfd->start_address;
> (top) p read_pc()
> $1 = 8084919611063009279
> (top) p /x read_pc()
> $2 = 0x7033678ceeffffff
> (top)
>
> Looks like someone thinks the program counter is a 64 bit value.... Any
> hints?
The CORE_ADDR type _is_ a 64-bit value, and MIPS addresses do sign
extend; this has caused all sorts of interesting problems, if you check
the list archives. Something has read it in endian-swapped, however.
I'd investigate what; maybe REGISTER_BYTE fallout?
I haven't seen this happen on my MIPS targets either.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
More information about the Gdb
mailing list