From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18277 invoked by alias); 17 Feb 2008 07:14:58 -0000 Received: (qmail 18268 invoked by uid 22791); 17 Feb 2008 07:14:57 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 17 Feb 2008 07:14:40 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1JQdjN-0008He-CV for gdb@sources.redhat.com; Sun, 17 Feb 2008 10:14:36 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1JQdj8-0008Gq-CO; Sun, 17 Feb 2008 10:14:18 +0300 From: Vladimir Prus To: Nick Roberts Subject: Re: Variable objects and STL containers Date: Sun, 17 Feb 2008 07:14:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: Daniel Jacobowitz , gdb@sources.redhat.com References: <18343.64413.689019.489727@kahikatea.snap.net.nz> <18357.23056.842755.97621@kahikatea.snap.net.nz> <18359.32130.501577.586179@kahikatea.snap.net.nz> In-Reply-To: <18359.32130.501577.586179@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802171014.18612.ghost@cs.msu.su> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00114.txt.bz2 On Sunday 17 February 2008 03:19:14 Nick Roberts wrote: > > Creating variable objects using internals wasn't so hard for vectors but > > it gets a bit more tricky with lists. > > Actually it looks doable for lists, maps etc if the children of a variable > object were stored as a list rather than a vector. This is so that a new > child can be added, or an old one deleted, at any point in the list. > > Ironically, the children were previously stored in a linked list and I guess > vectors were used because Nathan Sidwell has created an API in C for them. > There doesn't appear to be a similar API for lists, but since they are more > flexible, would it be possible to revert var->children to a linked list? I'm afraid I don't see any such flexibility. Can you clarify? The vectors were used because they allowed to eliminate lots of custom list handling code, and I'm reluctant to go back. - Volodya