From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28732 invoked by alias); 7 Jul 2009 08:54:56 -0000 Received: (qmail 28724 invoked by uid 22791); 7 Jul 2009 08:54:55 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_32,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jul 2009 08:54:42 +0000 Received: (qmail 19358 invoked from network); 7 Jul 2009 08:54:40 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 7 Jul 2009 08:54:40 -0000 From: Vladimir Prus To: Jan Kratochvil Subject: Re: [patch 4/8] Types GC [varobj_list to all_root_varobjs] Date: Tue, 07 Jul 2009 08:54:00 -0000 User-Agent: KMail/1.11.90 (Linux/2.6.24-24-generic; KDE/4.2.90; i686; svn-979530; 2009-06-10) Cc: Tom Tromey , gdb-patches@sourceware.org References: <20090525080233.GD13323@host0.dyn.jankratochvil.net> <200907021409.39886.vladimir@codesourcery.com> <20090704210912.GA1600@host0.dyn.jankratochvil.net> In-Reply-To: <20090704210912.GA1600@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_Q1wUKCWncENzQNr" Message-Id: <200907071254.40994.vladimir@codesourcery.com> 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-07/txt/msg00180.txt.bz2 --Boundary-00=_Q1wUKCWncENzQNr Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-length: 1626 On Sunday 05 July 2009 Jan Kratochvil wrote: > On Thu, 02 Jul 2009 12:09:39 +0200, Vladimir Prus wrote: > > On Thursday 02 July 2009 Jan Kratochvil wrote: > > > Is it OK to check it in, Vladimir? The patch would go in unchanged: > > > http://sourceware.org/ml/gdb-patches/2009-05/msg00547.html > > > > Is this cleanup-only patch? > > Yes. > > > I am a bit concerned that it appears to increase code size, > > all_root_varobjs fully replaced the varobj_list function which just could not > be deleted as it was still used by varobj_invalidate. varobj_invalidate was > rewritten in a later patch where varobj_list could be finally dropped: > [patch 8/8] Types GC [varobj] > http://sourceware.org/ml/gdb-patches/2009-05/msg00551.html Is that patch awaiting review, or some newer version is forthcoming? > > > The `floating' lockup will get fixed by a later patch using this new > > > all_root_varobjs function. A testcase for it was in a now-obsolete patch: > > > [patch] Fix gdb.mi hang on floating VAROBJs > > > http://sourceware.org/ml/gdb-patches/2009-05/msg00433.html > > > This patch itself still does not fix it. > > > > IIUC, the varobj_invalidate problem can be fixed with a small patch below. > > Yes, such patch works. > > Sending also a code style fixup on top of your fix to make the code more safe > preventing such errors in the future. > > Please provide a ChangeLog entry to your fix, check it in It now checked in, as attached. > and approve the > fixup + a testcase below. This is OK, thanks. > The all_root_varobjs patch / VEC rewrite I will re-send afterwards. OK. Thanks, Volodya --Boundary-00=_Q1wUKCWncENzQNr Content-Type: text/x-patch; charset="UTF-8"; name="hang.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="hang.diff" Content-length: 1288 Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.10694 diff -u -p -r1.10694 ChangeLog --- ChangeLog 7 Jul 2009 08:47:09 -0000 1.10694 +++ ChangeLog 7 Jul 2009 08:50:02 -0000 @@ -1,5 +1,12 @@ 2009-07-07 Vladimir Prus + Fix hang in floating varobjs. + + * varob.c (varobj_invalidate): Advance to next + element when processing floating varobj. + +2009-07-07 Vladimir Prus + * varobj.c: Remove unnecessary include. 2009-07-07 Tristan Gingold Index: varobj.c =================================================================== RCS file: /cvs/src/src/gdb/varobj.c,v retrieving revision 1.140 diff -u -p -r1.140 varobj.c --- varobj.c 7 Jul 2009 08:47:10 -0000 1.140 +++ varobj.c 7 Jul 2009 08:50:02 -0000 @@ -3231,8 +3231,10 @@ varobj_invalidate (void) /* Floating varobjs are reparsed on each stop, so we don't care if the presently parsed expression refers to something that's gone. */ - if ((*varp)->root->floating) + if ((*varp)->root->floating) { + varp++; continue; + } /* global var must be re-evaluated. */ if ((*varp)->root->valid_block == NULL) --Boundary-00=_Q1wUKCWncENzQNr--