This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: mipsbe solib event breakpoint endian?
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Kris Warkentin <kewarken at qnx dot com>
- Cc: Kevin Buettner <kevinb at redhat dot com>,"Gdb at Sources dot Redhat dot Com" <gdb at sources dot redhat dot com>
- Date: Thu, 10 Jul 2003 11:09:45 -0400
- Subject: Re: mipsbe solib event breakpoint endian?
- References: <008001c34173$d6d20b40$0202040a@catdog> <1030708201312.ZM4704@localhost.localdomain> <0c4d01c346f4$c69d0690$0202040a@catdog>
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