From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14332 invoked by alias); 10 Jul 2003 15:09:49 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 14316 invoked from network); 10 Jul 2003 15:09:48 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 10 Jul 2003 15:09:48 -0000 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19ad3J-00088x-00; Thu, 10 Jul 2003 11:09:45 -0400 Date: Thu, 10 Jul 2003 15:09:00 -0000 From: Daniel Jacobowitz To: Kris Warkentin Cc: Kevin Buettner , "Gdb@Sources.Redhat.Com" Subject: Re: mipsbe solib event breakpoint endian? Message-ID: <20030710150944.GA31232@nevyn.them.org> Mail-Followup-To: Kris Warkentin , Kevin Buettner , "Gdb@Sources.Redhat.Com" References: <008001c34173$d6d20b40$0202040a@catdog> <1030708201312.ZM4704@localhost.localdomain> <0c4d01c346f4$c69d0690$0202040a@catdog> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0c4d01c346f4$c69d0690$0202040a@catdog> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-07/txt/msg00126.txt.bz2 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