From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15709 invoked by alias); 11 May 2008 21:29:30 -0000 Received: (qmail 15701 invoked by uid 22791); 11 May 2008 21:29:30 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 11 May 2008 21:29:11 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 6AED998278; Sun, 11 May 2008 21:29:09 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 8819298149; Sun, 11 May 2008 21:29:08 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JvJ6K-0002QI-Ku; Sun, 11 May 2008 17:29:00 -0400 Date: Sun, 11 May 2008 21:29:00 -0000 From: Daniel Jacobowitz To: "Anmol P. Paralkar" Cc: gdb@sourceware.org Subject: Re: Question on attribute save-restore in reg elements (target descriptions). Message-ID: <20080511212900.GB9153@caradoc.them.org> Mail-Followup-To: "Anmol P. Paralkar" , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes 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: 2008-05/txt/msg00092.txt.bz2 On Fri, May 09, 2008 at 04:41:58PM -0500, Anmol P. Paralkar wrote: > Hello, > > Per Appendix F, Sec. F.2.5 Registers, of the GDB User Manual: > > save-restore > > Whether the register should be preserved across inferior function > calls; this must be either yes or no. The default is yes, which > is appropriate for most registers except for some system control > registers; this is not related to the target's ABI. > > In our target description file, we have a lot of special purpose > registers about which nothing might be assumed either way, so in > addition to 'yes' and 'no', can we have an "unspecified" value to > this attribute, (say, denoted by '?')? In what way does GDB use this > information? GDB uses this information to make a decision, so clearly it can not be unspecified - GDB would have to do something unspecified... When the user types "print foo()" GDB will save and restore those registers which are marked with save-restore="yes". Generally this is what you want for GPRs but not what you want for global system state like coprocessor control registers. -- Daniel Jacobowitz CodeSourcery