From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21225 invoked by alias); 30 Jan 2008 07:19:51 -0000 Received: (qmail 21177 invoked by uid 22791); 30 Jan 2008 07:19:50 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Jan 2008 07:19:33 +0000 Received: (qmail 28600 invoked from network); 30 Jan 2008 07:19:31 -0000 Received: from unknown (HELO 172.16.unknown.plus.ru) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 30 Jan 2008 07:19:31 -0000 From: Vladimir Prus To: gdb-patches@sources.redhat.com Subject: Re: [RFA] Use vector for varobj_list_children interface. Date: Wed, 30 Jan 2008 07:22:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) References: <200801171755.47572.vladimir@codesourcery.com> <20080129215240.GG15063@caradoc.them.org> In-Reply-To: <20080129215240.GG15063@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801301019.53604.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: 2008-01/txt/msg00770.txt.bz2 On Wednesday 30 January 2008 00:52:40 Daniel Jacobowitz wrote: > On Thu, Jan 17, 2008 at 05:55:47PM +0300, Vladimir Prus wrote: > > + for (ix = 0; VEC_iterate (varobj_p, children, ix, child); ++ix) > > { > > struct cleanup *cleanup_child; > > cleanup_child = make_cleanup_ui_out_tuple_begin_end (uiout, "child"); > > - print_varobj (*cc, print_values, 1 /* print expression */); > > - cc++; > > + print_varobj (child, print_values, 1 /* print expression */); > > do_cleanups (cleanup_child); > > } > > do_cleanups (cleanup_children); > > - xfree (childlist); > > return MI_CMD_DONE; > > } > > Not freeing children here is on purpose, right? It's now the copy > from inside the varobj. Right. I've added a comment to varobj_list_children to make this more clear. > > > -int > > -varobj_list_children (struct varobj *var, struct varobj ***childlist) > > +VEC(varobj_p)* > > Space there :-) Strictly speaking, I think that gcc does not use space after VEC. But I have better things to do that arguing about this ;-) > Otherwise OK, thanks. Thanks. I've also noticed I did not update dependencies for varobj_h, now that it includes vec.h. I've added that, and checked in. - Volodya