From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26292 invoked by alias); 29 Jan 2008 21:53:07 -0000 Received: (qmail 26282 invoked by uid 22791); 29 Jan 2008 21:53:07 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Jan 2008 21:52:42 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 6018F98151; Tue, 29 Jan 2008 21:52:41 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 347E49811F; Tue, 29 Jan 2008 21:52:41 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JJyNk-0005RG-6k; Tue, 29 Jan 2008 16:52:40 -0500 Date: Tue, 29 Jan 2008 21:54:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Use vector for varobj_list_children interface. Message-ID: <20080129215240.GG15063@caradoc.them.org> Mail-Followup-To: Vladimir Prus , gdb-patches@sources.redhat.com References: <200801171755.47572.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200801171755.47572.vladimir@codesourcery.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes 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/msg00733.txt.bz2 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. > -int > -varobj_list_children (struct varobj *var, struct varobj ***childlist) > +VEC(varobj_p)* Space there :-) > +varobj_list_children (struct varobj *var) > -extern int varobj_list_children (struct varobj *var, > - struct varobj ***childlist); > +extern VEC(varobj_p)* varobj_list_children (struct varobj *var); Space there too. Otherwise OK, thanks. -- Daniel Jacobowitz CodeSourcery