From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25323 invoked by alias); 6 Aug 2007 01:20:22 -0000 Received: (qmail 25207 invoked by uid 22791); 6 Aug 2007 01:20:21 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.dnsmadeeasy.com (HELO smtp1.dnsmadeeasy.com) (205.234.170.134) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Aug 2007 01:20:19 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id CAF773067E2; Mon, 6 Aug 2007 01:20:17 +0000 (UTC) X-Authenticated-Name: js.dnsmadeeasy X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com Received: from avtrex.com (unknown [67.116.42.147]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP; Mon, 6 Aug 2007 01:20:17 +0000 (UTC) Received: from jennifer.localdomain ([192.168.7.229]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Sun, 5 Aug 2007 18:20:17 -0700 Message-ID: <46B676EB.5010205@avtrex.com> Date: Mon, 06 Aug 2007 01:20:00 -0000 From: David Daney User-Agent: Thunderbird 2.0.0.5 (X11/20070719) MIME-Version: 1.0 To: Vinod pandarinathan Cc: gdb@sourceware.org Subject: Re: MIPS 64 bit addressing query References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00050.txt.bz2 Vinod pandarinathan wrote: > Hi Experts, > > > I found that gdb6.4.1 is sign extending the > PC before comparing it to the breakpoint address[bpt->address]. > > Sign extension happens in mips-tdep.c > > /* MIPS believes that the PC has a sign extended value. Perhaps the > all registers should be sign extended for simplicity? */ > > static CORE_ADDR > mips_read_pc (ptid_t ptid) > { > return read_signed_register_pid (mips_regnum (current_gdbarch)->pc, ptid); > } > The target suspends at the breakpoint, but the debugger is not able to > identify the associated breakpoint as [unsigned value is compared to a > 64 bit sign extended value]. > > We are using MIPS 3 ISA and since breakpoint is set at an address > where the 32nd bit is set to 1 the 64 bit sign extended values does > not compare with the unsigned > break point address. > > Can you please explain how we can fix the problem? Should I sign > extend the break point address too ? > I am running gdb-6.6 on mips64-linux (All of n32, n64 and o32 ABIs) with no apparent problems. Perhaps you should upgrade. David Daney