From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11250 invoked by alias); 30 Jul 2009 06:46:06 -0000 Received: (qmail 11239 invoked by uid 22791); 30 Jul 2009 06:46:04 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,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; Thu, 30 Jul 2009 06:45:55 +0000 Received: (qmail 1651 invoked from network); 30 Jul 2009 06:45:53 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 30 Jul 2009 06:45:53 -0000 From: Vladimir Prus To: Tom Tromey Subject: Re: [patch 0/4] varobj_list replacement [Re: [patch 4/8] Types GC [varobj_list to all_root_varobjs]] Date: Thu, 30 Jul 2009 08:46: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: Jan Kratochvil , gdb-patches@sourceware.org References: <20090525080233.GD13323@host0.dyn.jankratochvil.net> <20090710201104.GA7014@host0.dyn.jankratochvil.net> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200907301045.51541.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/msg00735.txt.bz2 On Wednesday 29 July 2009 Tom Tromey wrote: > >>>>> "Jan" == Jan Kratochvil writes: > > Volodya> Can we just make varobj.c expose vector of varobjs? > > Jan> In general iterators are preferred over direct variable access in > Jan> modern programming. > > Yeah, but what about in gdb? ;) > > Jan> Still I would prefer: > Jan> Iterator - so-called "safe" (keeping the next pointer) double link list: > > This patch (assuming it was the 4/4 patch) seemed pretty clean to me. ... > I understand from other mail that this patch is a prerequisite to the > type GC work. However, I don't understand in what way it is needed. I > probably missed something... could you either explain it or tell me > where to look? In fact, I'm lost the big picture as well. If we want to optimize uninstall_variable, then the 4/4 patch appears to be the simplest one that does the trick. However, if that's a part of some bigger story, I'd be interested to understand it. Thanks, Volodya