From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22736 invoked by alias); 5 Dec 2003 02:03:55 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22578 invoked from network); 5 Dec 2003 02:03:53 -0000 Received: from unknown (HELO faui10.informatik.uni-erlangen.de) (131.188.31.10) by sources.redhat.com with SMTP; 5 Dec 2003 02:03:53 -0000 Received: from faui1d.informatik.uni-erlangen.de (faui1d [131.188.31.34]) by faui10.informatik.uni-erlangen.de (8.9.3p3/8.1.9-FAU) with ESMTP id DAA27025; Fri, 5 Dec 2003 03:03:52 +0100 (CET) From: Ulrich Weigand Received: (from weigand@localhost) by faui1d.informatik.uni-erlangen.de (8.9.3p3/8.1.6-FAU) id DAA08025; Fri, 5 Dec 2003 03:03:52 +0100 (CET) Message-Id: <200312050203.DAA08025@faui1d.informatik.uni-erlangen.de> Subject: Re: [PATCH] S/390 DWARF-2 CFI frame support To: rth@redhat.com (Richard Henderson) Date: Fri, 05 Dec 2003 02:03:00 -0000 Cc: weigand@i1.informatik.uni-erlangen.de (Ulrich Weigand), gdb-patches@sources.redhat.com, uweigand@de.ibm.com In-Reply-To: <20031205004756.GA18170@redhat.com> from "Richard Henderson" at Dec 04, 2003 04:47:56 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-12/txt/msg00179.txt.bz2 Richard Henderson wrote: > On Thu, Dec 04, 2003 at 09:09:12PM +0100, Ulrich Weigand wrote: > > To fix this, I suggest the following. What GCC assumes to happen > > when it leaves a register unspecified in the CFI depends on whether > > the register is call-saved or call-clobbered according to the > > target's ABI. If it is call-saved (and unspecified), the function > > doesn't save/restore it because it does not in fact ever modify it. > > Thus, in this case the debugger should copy the value from the > > inner frame. If it is call-clobbered (those will always be left > > unspecified), it should be assumed undefined. > > This is wrong. The debugger should just assume *all* registers > that are not explicitly saved are preserved. In the case of > call-clobbered registers, you just won't *know* that they are > actually dead. But so what? This is no worse than not having > location list information that tells you that a value is dead > after its register gets re-used for something else. I have no strong opinion about that; if the gdb maintainers accept treating all unspecified registers as preserved, that is fine with me as well. (I just don't want to see that annoying warning all the time ;-/) However, there is one point that requires special consideration in any case: what if the stack pointer is unspecified? On s390, treating it as preserved from the inner frame is correct, but on i386 and other platforms I guess this would be wrong -- it needs to be set to the CFA there (which is wrong on s390 due to the CFA bias we have). I'm not familiar enough with gdb internals to decide what the cleanest way of signaling that difference would be -- but there needs to be *some* way or s390 will not work. (My reggroup suggestion would provide a way to solve this problem as well.) Bye, Ulrich -- Dr. Ulrich Weigand weigand@informatik.uni-erlangen.de