From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23475 invoked by alias); 4 Apr 2008 19:29:25 -0000 Received: (qmail 23446 invoked by uid 22791); 4 Apr 2008 19:29:23 -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; Fri, 04 Apr 2008 19:29:04 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 4FF54983BE; Fri, 4 Apr 2008 19:29:01 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id CD69F982C4; Fri, 4 Apr 2008 19:29:00 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Jhrat-0001Im-Q1; Fri, 04 Apr 2008 15:28:59 -0400 Date: Fri, 04 Apr 2008 22:06:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [RFC 1/5] Lazy register values Message-ID: <20080404192859.GA4910@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org References: <20080331220656.GA22012@caradoc.them.org> <200804041917.m34JHcNk029476@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200804041917.m34JHcNk029476@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes 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: 2008-04/txt/msg00110.txt.bz2 On Fri, Apr 04, 2008 at 09:17:38PM +0200, Ulrich Weigand wrote: > I like this approach! However, I'm wondering about some of the > value_lazy changes; for example in code like: > > v = allocate_value (elt_type); > if (value_lazy (array)) > set_value_lazy (v, 1); > else > memcpy (value_contents_writeable (v), > value_contents (array) + elt_offs, elt_size); > (in value_subscripted_rvalue), it doesn't seem right to simply > change the if to > if (VALUE_LVAL (array) == lval_memory && value_lazy (array)) > > If that function were ever called with a lazy register value, > the "else" part would copy from value_contents of that lazy > value, which is actually undefined. I don't think that's what happens - value_contents -> value_contents_writeable -> value_fetch_lazy. I figured the fetch at this point was acceptable; we work hard to avoid fetching memory because it might be large, but registers are better bounded. Do you agree, or are the offsets worthwhile after all? > I've read through the rest of the patches in this series, > and they look fine to me. I'd be happy to convert any of > the platforms I have access to (s390, ppc, spu, ia64). Thanks! My plan is to wait until at least next week, in case anyone else has comments; revise for comments; do as many other platforms as I can test; and then start checking this in. I'll fix any other platforms I'm asked to. I don't expect any substantial revisions, in case you feel like getting a head start :-) -- Daniel Jacobowitz CodeSourcery