From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27849 invoked by alias); 29 Nov 2006 04:14:15 -0000 Received: (qmail 27838 invoked by uid 22791); 29 Nov 2006 04:14:14 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Nov 2006 04:14:07 +0000 Received: from kahikatea.snap.net.nz (p202-124-120-131.snap.net.nz [202.124.120.131]) by viper.snap.net.nz (Postfix) with ESMTP id C991A3DA0BA; Wed, 29 Nov 2006 17:14:50 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 0C145BE452; Wed, 29 Nov 2006 17:09:47 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17773.2057.807160.209965@kahikatea.snap.net.nz> Date: Wed, 29 Nov 2006 04:14:00 -0000 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: Variable objects laziness In-Reply-To: <20061129025457.GA11339@nevyn.them.org> References: <17772.60058.228181.835591@kahikatea.snap.net.nz> <20061129025457.GA11339@nevyn.them.org> X-Mailer: VM 7.19 under Emacs 22.0.91.6 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: 2006-11/txt/msg00367.txt.bz2 > > Also -var-update only reports a change when the address changes and not > > the value. Variable objects were broken before but in a different way > > (-var-assign worked but -var-update always reported that the reference > > value had changed). > > Just so we're all on the same page, could you post a compilable test > case? I don't need a dejagnu-ified one, just some C++. Any C++ program with references (I've never used them in earnest) would do e.g 1: main() 2: { 3: int x = 4; 4: int& rx = x; 5: x = 7; 6: } 1) Do -var-create * - rx before line 4. 2) -var-update --all-values after line 4 picks up the change of address. 3) -var-update --all-values after line 5 doesn't pick up the change of value. 4) -var-assign var1 generates an internal error. > > I think a further call to coerce_array is needed and the output to -var-update > > should look like: > > > > > > -var-update --all-values var1 > > ^done,changelist=[{name="var1",value="4",in_scope="true",type_chan ged="false"}] > > > > i.e the address shouldn't appear in the value field. > > Is that what it did before? I guess it's not surprising. No, before it would give the address too: ^done,changelist=[{name="var1",value="@0xbff72ebc: 4",in_scope="true",type_chan ged="false"}] like now, but all the time e.g if you issued -var-update twice without doing anything in between. -- Nick http://www.inet.net.nz/~nickrob