From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95881 invoked by alias); 5 Jun 2015 03:03:11 -0000 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 Received: (qmail 95723 invoked by uid 89); 5 Jun 2015 03:02:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 05 Jun 2015 03:02:54 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Z0huE-0005MP-Ly from Taimoor_Mirza@mentor.com ; Thu, 04 Jun 2015 20:02:50 -0700 Received: from [137.202.157.84] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 5 Jun 2015 04:02:43 +0100 Message-ID: <5571114A.4060806@codesourcery.com> Date: Fri, 05 Jun 2015 03:03:00 -0000 From: Taimoor User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: , Vladimir Prus Subject: Re: [PATCH 2/2] [PING]Testsuite for varobj updation after symbol removal References: <1429155160-4816-1-git-send-email-tmirza@codesourcery.com> <1429155160-4816-3-git-send-email-tmirza@codesourcery.com> <5538A7A6.3000908@codesourcery.com> <553E83ED.80000@gmail.com> <5550B37B.4050201@codesourcery.com> In-Reply-To: <5550B37B.4050201@codesourcery.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00077.txt.bz2 ping. If there are no further comments, Can I push this change? Thanks, Taimoor On 05/11/2015 06:49 PM, Taimoor wrote: > > > On 04/27/2015 11:46 PM, Vladimir Prus wrote: >> >> thanks, so the issue is that removing a symbol file recreates >> *all* global varobjs, and in the process clears any change of value >> since the last update. I agree the patch is fixing that. >> >> There's a second change, it seems - to invalidate varobj that refers >> to types in unloaded objfile - is there a test for that? >> > > Hi Vladimir, > > Sorry for delayed response. There are no separate tests for invalidation > of varobjs in unloaded objfile as it gets tested by existing varobj > tests. If we don't invalidate varobjs in unloaded objfile, a lot GDB > tests will fail. This is because while trying to retrieve old varobj > value for already removed objfile (to compare with current value), it > will try to access pointers that are no longer valid and that will > result in failure. > Marking varobjs that refers to types in unloaded objfile invalid makes > sure we do not accidentally use dangling pointers to obtain varobj value > for unloaded objfile. > > IMO, GDB should avoid using pointers whose target has been already freed > and this change specifically marks var->type to NULL to make sure no > dangling pointers remain after objfile is unloaded so any subsequent > call to varobj_get_value does not result in segmentation fault. > > > Thanks, > Taimoor