From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21531 invoked by alias); 1 Mar 2012 01:33:40 -0000 Received: (qmail 21521 invoked by uid 22791); 1 Mar 2012 01:33:39 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Mar 2012 01:33:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DBE301C6BAE; Wed, 29 Feb 2012 20:33:25 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id eNFxrhmfdnqT; Wed, 29 Feb 2012 20:33:25 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7333F1C6BAD; Wed, 29 Feb 2012 20:33:25 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 53355145615; Wed, 29 Feb 2012 17:33:18 -0800 (PST) Date: Thu, 01 Mar 2012 01:33:00 -0000 From: Joel Brobecker To: Kevin Buettner Cc: gdb-patches@sourceware.org, Thomas Schwinge Subject: Re: [RFC] sh-tdep.c: Don't fetch FPSCR register if it doesn't exist Message-ID: <20120301013318.GJ3118@adacore.com> References: <20120229173408.78699013@mesquite.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120229173408.78699013@mesquite.lan> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2012-03/txt/msg00002.txt.bz2 > Comments? Is there a better way to test for the existence of a register? Perhaps an idea... Apparently, this is a property of the arch, so something relatively static. This is typically the type of information the sh_gdbarch_init routine would save in the gdbarch_tdep structure. You can create a new flag in that structure, and then set it at the same time you register the register_name gdbarch hook. > * sh-tdep.c (sh_frame_cache): Don't fetch the FPSCR register > unless it exists for this architecture. -- Joel