From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26182 invoked by alias); 25 Jul 2007 16:47:48 -0000 Received: (qmail 26174 invoked by uid 22791); 25 Jul 2007 16:47:48 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 25 Jul 2007 16:47:45 +0000 Received: (qmail 25041 invoked from network); 25 Jul 2007 16:47:43 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 25 Jul 2007 16:47:43 -0000 To: "Maciej W. Rozycki" Cc: gdb-patches@sourceware.org, Nigel Stephens , Chris Dearman , "Maciej W. Rozycki" Subject: Re: Use the address mask with addresses for SREC, etc. References: From: Jim Blandy Date: Wed, 25 Jul 2007 17:53:00 -0000 In-Reply-To: (Maciej W. Rozycki's message of "Tue, 24 Jul 2007 18:34:29 +0100 (BST)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00274.txt.bz2 It's my understanding that addresses are signed on MIPS architectures, and thus 32-bit SREC files are only capable of addressing locations 0xffffffff80000000 -- 0x000000007fffffff. And that the issue you're fixing here arises from BFD handing you addresses read from an SREC file (which is using 32-bit addresses) in the 0x80000000 -- 0xffffffff range. Is that right? I'm not too happy with complicating code in GDB because BFD is providing it with the wrong addresses. I have to imagine the same thing would happen elsewhere. When BFD reads the SREC file, does it have any idea that it's a MIPS SREC file? It looks like bfd_get_sign_extend_vma doesn't know about MIPS SREC targets; would fixing that, and then bfd/srec.c, help us get the right addresses into the BFD?