From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28106 invoked by alias); 1 May 2009 12:00:15 -0000 Received: (qmail 28057 invoked by uid 22791); 1 May 2009 12:00:14 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_17,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx.southnet.co.nz (HELO viper.snap.net.nz) (202.37.101.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 May 2009 12:00:07 +0000 Received: from totara (unknown [123.255.29.79]) by viper.snap.net.nz (Postfix) with ESMTP id 3F14E3DA33C; Sat, 2 May 2009 00:00:04 +1200 (NZST) Received: by totara (Postfix, from userid 1000) id D708AC133; Sat, 2 May 2009 00:00:03 +1200 (NZST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18938.58435.813818.170271@totara.tehura.co.nz> Date: Fri, 01 May 2009 12:00:00 -0000 To: "Marc Khouzam" Cc: Subject: [Patch] [MI] Out-of-scope varObjects no longer trigger a var-update change In-Reply-To: <6D19CA8D71C89C43A057926FE0D4ADAA0759C401@ecamlmw720.eamcs.ericsson.se> References: <6D19CA8D71C89C43A057926FE0D4ADAA0759C401@ecamlmw720.eamcs.ericsson.se> From: nickrob@snap.net.nz (Nick Roberts) 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: 2009-05/txt/msg00014.txt.bz2 > I believe a small bug slipped in the refactoring of varobj_update > interface from: > http://sourceware.org/ml/gdb-patches/2008-05/msg00106.html > > From what I see, varobj that are not in scope don't get flagged > as changed, because nothing was being pushed on the result vector. > The attached patch fixes this. I'm not sure that I see this. If the variable goes out of scope then, as the comment says, then value_of_root returns NULL. But (*varp)->value is not NULL, so install_new_value returns 1 and r.changed is set to 1 and r gets pushed onto the result vector. > The MI part of the testsuite passed ok. > I have an test to trigger the bug, if you care to see it. Yes, please post that. The current testsuite covers varobjs that go out of scope. If it is a regression then there needs to be a test that covers this mode of failure in any case. -- Nick http://www.inet.net.nz/~nickrob