From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19185 invoked by alias); 28 May 2015 09:52:31 -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 19175 invoked by uid 89); 28 May 2015 09:52:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 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; Thu, 28 May 2015 09:52:29 +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 1YxuUD-0001IW-30 from Taimoor_Mirza@mentor.com ; Thu, 28 May 2015 02:52:25 -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; Thu, 28 May 2015 10:52:23 +0100 Message-ID: <5566E553.6030607@codesourcery.com> Date: Thu, 28 May 2015 09:52: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: "gdb-patches@sourceware.org" , Vladimir Prus Subject: Re: [PATCH 2/2] 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-05/txt/msg00678.txt.bz2 Hi Vladimir, Do you have any further comments on the change or I should push it in? 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