From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20868 invoked by alias); 30 Mar 2008 03:54:46 -0000 Received: (qmail 20860 invoked by uid 22791); 30 Mar 2008 03:54:46 -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; Sun, 30 Mar 2008 03:54:20 +0000 Received: from kahikatea.snap.net.nz (115.60.255.123.dynamic.snap.net.nz [123.255.60.115]) by viper.snap.net.nz (Postfix) with ESMTP id AF7D93D9841; Sun, 30 Mar 2008 16:54:16 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id E87438FC6D; Sun, 30 Mar 2008 15:54:11 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18415.3808.504498.834488@kahikatea.snap.net.nz> Date: Sun, 30 Mar 2008 03:54:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: -var-update @ In-Reply-To: <200803290937.57101.vladimir@codesourcery.com> References: <200803261754.10513.vladimir@codesourcery.com> <200803271338.24328.vladimir@codesourcery.com> <18413.53371.781723.755958@kahikatea.snap.net.nz> <200803290937.57101.vladimir@codesourcery.com> X-Mailer: VM 7.19 under Emacs 23.0.60.53 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-03/txt/msg00486.txt.bz2 > So, we still don't know why the current code does not work? I think > we still get to figure out, to make sure that whatever bug there is > does not affect other cases. My patch didn't do the right thing (it always marked a floating variable object as changed) but it's along the right lines. How about this one? -- Nick http://www.inet.net.nz/~nickrob 2008-03-30 Nick Roberts * varobj.c (value_of_root): Update expression of root for floating variable objects. *** varobj.c.~1.108.~ 2008-03-27 08:02:16.000000000 +1200 --- varobj.c 2008-03-30 15:41:44.000000000 +1200 *************** varobj_update (struct varobj **varp, str *** 1739,1744 **** --- 1739,1751 ---- new_type = varobj_get_type (tmp_var); if (strcmp (old_type, new_type) == 0) { + struct expression *tmp_exp; + + /* Update expression to new frame. */ + tmp_exp = var->root->exp; + var->root->exp = tmp_var->root->exp; + tmp_var->root->exp = tmp_exp; + varobj_delete (tmp_var, NULL, 0); *type_changed = 0; }