From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10789 invoked by alias); 6 Aug 2007 00:57:42 -0000 Received: (qmail 10742 invoked by uid 22791); 6 Aug 2007 00:57:42 -0000 X-Spam-Check-By: sourceware.org Received: from an-out-0708.google.com (HELO an-out-0708.google.com) (209.85.132.247) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Aug 2007 00:57:38 +0000 Received: by an-out-0708.google.com with SMTP id c23so256037anc for ; Sun, 05 Aug 2007 17:57:37 -0700 (PDT) Received: by 10.100.94.3 with SMTP id r3mr2874025anb.1186361856918; Sun, 05 Aug 2007 17:57:36 -0700 (PDT) Received: by 10.100.127.9 with HTTP; Sun, 5 Aug 2007 17:57:36 -0700 (PDT) Message-ID: Date: Mon, 06 Aug 2007 00:57:00 -0000 From: "Vinod pandarinathan" To: gdb@sourceware.org Subject: MIPS 64 bit addressing query MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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/msg00049.txt.bz2 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 ? Thanks Vinod.