From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28760 invoked by alias); 30 Mar 2006 17:15:09 -0000 Received: (qmail 28752 invoked by uid 22791); 30 Mar 2006 17:15:08 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 30 Mar 2006 17:15:06 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FP0jf-0000gU-7E; Thu, 30 Mar 2006 12:15:03 -0500 Date: Thu, 30 Mar 2006 20:52:00 -0000 From: Daniel Jacobowitz To: Andrew STUBBS Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH][SH] invalid registers Message-ID: <20060330171503.GJ32409@nevyn.them.org> Mail-Followup-To: Andrew STUBBS , gdb-patches@sources.redhat.com References: <437B5C5F.5080500@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <437B5C5F.5080500@st.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00375.txt.bz2 On Wed, Nov 16, 2005 at 04:20:47PM +0000, Andrew STUBBS wrote: > Hi, > > The attached patch teaches GDB which registers are invalid in previous > frames when the CFI does not say otherwise. > > It does this using the SH4 ABI. This is backwards compatible with the > sh1-sh3 and variants. I have not attempted to deal with the DSP > registers as I don't know the ABI. They will be treated as ever. > > The only thing this patch actually does is allow the 'info registers' > command (and friends) to show '*invalid register*' when there is no way > to know the true value. > > Andrew Stubbs > 2005-11-16 Andrew Stubbs > > * sh-tdep.c (sh_dwarf2_frame_init_reg): New function. > (sh_gdbarch_init): Call dwarf2_frame_set_init_reg(). Hi Andrew, This is OK. Only S/390 uses the frame_init_reg hook this way today, but it seems sensible. But please wait a day or two in case anyone has comments on the downside. The downside is that you can't do this: (gdb) break *abort (gdb) continue ... (gdb) up (gdb) info registers Instead, you have to look at the registers while you're in the bottom frame (i.e. abort) instead of the aborting function. Would it be more useful if GDB could output "0x40000000 (may be clobbered)" somehow in info regs for DWARF2_FRAME_REG_UNDEFINED? But, not a big deal either way. -- Daniel Jacobowitz CodeSourcery