From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32462 invoked by alias); 19 May 2006 07:41:59 -0000 Received: (qmail 32444 invoked by uid 22791); 19 May 2006 07:41:58 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 19 May 2006 07:41:52 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FgzcE-0007sG-41 for gdb-patches@sources.redhat.com; Fri, 19 May 2006 09:41:42 +0200 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 May 2006 09:41:42 +0200 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 May 2006 09:41:42 +0200 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [PATCH] -var-update Date: Fri, 19 May 2006 09:47:00 -0000 Message-ID: References: <17497.14121.225320.477428@farnswood.snap.net.nz> <17517.21363.892697.745703@kahikatea.snap.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00409.txt.bz2 Nick Roberts wrote: > > I do not quite understand why coerce_array is used; I suspect the > > contents of an array are checked via the children instead of the > > parent. coerce_array happens to also call coerce_ref. > > Maybe it's historical, as varobj_update used value_equal previously and > this uses coerce_array. > > Anyway here's a patch that actually seems to work. I've taken code from > c_val_print. Maybe there should be more checks and I've not tested > varobj_set_value (-var-assign) yet, but I thought I'd sound out the > genaral approcah first. I think that in any case, you should add a function and call it, instead of adding three identical code fragments. BTW, why coerce_ref is not suitable here? - Volodya