From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15326 invoked by alias); 28 Jan 2007 00:46:36 -0000 Received: (qmail 15314 invoked by uid 22791); 28 Jan 2007 00:46:35 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 28 Jan 2007 00:46:23 +0000 Received: from kahikatea.snap.net.nz (164.61.255.123.dynamic.snap.net.nz [123.255.61.164]) by viper.snap.net.nz (Postfix) with ESMTP id 961163D8326; Sun, 28 Jan 2007 13:46:15 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 0AA2B4F72B; Sun, 28 Jan 2007 13:46:16 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17851.62039.333484.886195@kahikatea.snap.net.nz> Date: Sun, 28 Jan 2007 00:46:00 -0000 To: Vladimir Prus Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: -var-info-path-expression In-Reply-To: <200701280048.37153.ghost@cs.msu.su> References: <200612251200.42622.ghost@cs.msu.su> <20070103223920.GN17935@nevyn.them.org> <200701051214.18645.ghost@cs.msu.su> <200701280048.37153.ghost@cs.msu.su> X-Mailer: VM 7.19 under Emacs 22.0.93.2 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: 2007-01/txt/msg00560.txt.bz2 > c_describe_child (struct varobj *parent, int index, > - char **cname, struct value **cvalue, struct type **ctype) > + char **cname, struct value **cvalue, struct type **ctype, > + char **cfull_expression) This argument list gets longer but, apart from only parent and index, only one argument is non-null at any one time. Would it be better to have enum varobj_child_properties { CHILD_NAME, CHILD_VALUE, CHILD_TYPE, CHILD_FULL_EXPRESSION } static void * c_describe_child (enum varobj_child_properties property, struct varobj *parent, int index) and propagate these changes back to struct language_specific so we have: static char * name_of_child (struct varobj *var, int index) { return (char *) (*var->root->lang->describe_child) (CHILD_NAME, var, index); } etc? -- Nick http://www.inet.net.nz/~nickrob