From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3125 invoked by alias); 19 May 2005 01:00:21 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 2892 invoked from network); 19 May 2005 01:00:13 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 19 May 2005 01:00:13 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DYZOX-0007Gn-CO; Wed, 18 May 2005 21:00:13 -0400 Date: Thu, 19 May 2005 01:00:00 -0000 From: Daniel Jacobowitz To: Richard Earnshaw Cc: gdb@sourceware.org Subject: Re: RFC: Available registers as a target property Message-ID: <20050519010013.GA27885@nevyn.them.org> Mail-Followup-To: Richard Earnshaw , gdb@sourceware.org References: <20050506162029.GA30792@nevyn.them.org> <20050517193228.GB7337@nevyn.them.org> <1116408515.15608.40.camel@pc960.cambridge.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1116408515.15608.40.camel@pc960.cambridge.arm.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00180.txt.bz2 On Wed, May 18, 2005 at 10:28:35AM +0100, Richard Earnshaw wrote: > On Tue, 2005-05-17 at 20:32, Daniel Jacobowitz wrote: > > > /* If this flag is set, GDB should save and restore this register > > around calls to an inferior function. */ > > int save_restore; > > Why would the target care about this? It seems to be more a property of > an ABI than the target. > > In the (IMO) unlikely case that we really want to keep this, I think it > should have a 'not-my-responsibility-to-decide' setting. This isn't the conventional callee-saved vs. caller-saved decision. GDB needs to handle bogus functions so it should save/restore all "normal" registers, but there may be some registers in a system for which this behavior is inappropriate. Perhaps there's a better name for this if I invert the meaning... For instance, a debugger should probably not muck with cp15 registers across a function call, even if they're not marked readonly, to allow the user to modify them explicitly. I'm trying to express the concept of save_reggroup/restore_reggroup for target specified registers. Have you got another idea of how to do it? Maybe it's not necessary after all? -- Daniel Jacobowitz CodeSourcery, LLC