From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14328 invoked by alias); 17 Oct 2013 13:34:59 -0000 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 Received: (qmail 14318 invoked by uid 89); 17 Oct 2013 13:34:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_00,GARBLED_BODY autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Oct 2013 13:34:58 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VWnj4-00022M-UY from Yao_Qi@mentor.com ; Thu, 17 Oct 2013 06:34:54 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 17 Oct 2013 06:34:54 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Thu, 17 Oct 2013 06:34:54 -0700 Message-ID: <525FE731.9080209@codesourcery.com> Date: Thu, 17 Oct 2013 13:34:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Joel Brobecker CC: Subject: Re: [PATCH 7/7] Remove ada-varobj.h. References: <1379512482-31773-1-git-send-email-yao@codesourcery.com> <1379512482-31773-8-git-send-email-yao@codesourcery.com> <20131017054642.GB3302@adacore.com> In-Reply-To: <20131017054642.GB3302@adacore.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00516.txt.bz2 On 10/17/2013 01:46 PM, Joel Brobecker wrote: >> +static int ada_varobj_get_number_of_children (struct value *parent_value, >> >+ struct type *parent_type); >> >+ >> > static void >> > ada_varobj_decode_var (struct value **value_ptr, struct type **type_ptr) >> > { > That declaration needs to be inserted_before_ the comment describing > ada_varobj_decode_var. Fixed. Patch is committed. Thanks for the review. -- Yao (齐尧) gdb: 2013-10-17 Yao Qi * Makefile.in (HFILES_NO_SRCDIR): Remove ada-varobj.h. * ada-varobj.c: Remove the include of ada-varobj.h. (ada_varobj_get_number_of_children): Declare. (ada_varobj_get_name_of_child): Make it static. (ada_varobj_get_path_expr_of_child): Likewise. (ada_varobj_get_value_of_child): Likewise. (ada_varobj_get_type_of_child): Likewise. (ada_varobj_get_value_of_array_variable): Likewise. * ada-varobj.h: Remove. --- gdb/Makefile.in | 2 +- gdb/ada-varobj.c | 16 ++++++++------ gdb/ada-varobj.h | 55 ------------------------------------------------------ 3 files changed, 10 insertions(+), 63 deletions(-) delete mode 100644 gdb/ada-varobj.h diff --git a/gdb/Makefile.in b/gdb/Makefile.in index f8abb35..fc2a3af 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -795,7 +795,7 @@ proc-utils.h aarch64-tdep.h arm-tdep.h ax-gdb.h ppcfbsd-tdep.h \ ppcnbsd-tdep.h cli-out.h gdb_expat.h breakpoint.h infcall.h obsd-tdep.h \ exec.h m32r-tdep.h osabi.h gdbcore.h solib-som.h amd64bsd-nat.h \ i386bsd-nat.h xml-support.h xml-tdesc.h alphabsd-tdep.h gdb_obstack.h \ -ia64-tdep.h ada-lang.h ada-varobj.h varobj.h frv-tdep.h nto-tdep.h serial.h \ +ia64-tdep.h ada-lang.h varobj.h frv-tdep.h nto-tdep.h serial.h \ c-lang.h d-lang.h go-lang.h frame.h event-loop.h block.h cli/cli-setshow.h \ cli/cli-decode.h cli/cli-cmds.h cli/cli-utils.h \ cli/cli-script.h macrotab.h symtab.h common/version.h \ diff --git a/gdb/ada-varobj.c b/gdb/ada-varobj.c index 52c7687..62454b8 100644 --- a/gdb/ada-varobj.c +++ b/gdb/ada-varobj.c @@ -18,7 +18,6 @@ along with this program. If not, see . */ #include "defs.h" -#include "ada-varobj.h" #include "ada-lang.h" #include "varobj.h" #include "language.h" @@ -49,6 +48,9 @@ it allows the code to use the type without having to worry about it being set or not. It makes the code clearer. */ +static int ada_varobj_get_number_of_children (struct value *parent_value, + struct type *parent_type); + /* A convenience function that decodes the VALUE_PTR/TYPE_PTR couple: If there is a value (*VALUE_PTR not NULL), then perform the decoding using it, and compute the associated type from the resulting value. @@ -324,7 +326,7 @@ ada_varobj_get_ptr_number_of_children (struct value *parent_value, /* Return the number of children for the (PARENT_VALUE, PARENT_TYPE) pair. */ -int +static int ada_varobj_get_number_of_children (struct value *parent_value, struct type *parent_type) { @@ -722,7 +724,7 @@ ada_varobj_describe_child (struct value *parent_value, The result should be deallocated after use with xfree. */ -char * +static char * ada_varobj_get_name_of_child (struct value *parent_value, struct type *parent_type, const char *parent_name, int child_index) @@ -742,7 +744,7 @@ ada_varobj_get_name_of_child (struct value *parent_value, The result must be deallocated after use with xfree. */ -char * +static char * ada_varobj_get_path_expr_of_child (struct value *parent_value, struct type *parent_type, const char *parent_name, @@ -761,7 +763,7 @@ ada_varobj_get_path_expr_of_child (struct value *parent_value, /* Return the value of child number CHILD_INDEX of the (PARENT_VALUE, PARENT_TYPE) pair. PARENT_NAME is the name of the parent. */ -struct value * +static struct value * ada_varobj_get_value_of_child (struct value *parent_value, struct type *parent_type, const char *parent_name, int child_index) @@ -778,7 +780,7 @@ ada_varobj_get_value_of_child (struct value *parent_value, /* Return the type of child number CHILD_INDEX of the (PARENT_VALUE, PARENT_TYPE) pair. */ -struct type * +static struct type * ada_varobj_get_type_of_child (struct value *parent_value, struct type *parent_type, int child_index) @@ -857,7 +859,7 @@ ada_varobj_get_value_of_array_variable (struct value *value, /* Return a string representation of the (VALUE, TYPE) pair, using the given print options OPTS as our formatting options. */ -char * +static char * ada_varobj_get_value_of_variable (struct value *value, struct type *type, struct value_print_options *opts) diff --git a/gdb/ada-varobj.h b/gdb/ada-varobj.h deleted file mode 100644 index 924997d..0000000 --- a/gdb/ada-varobj.h +++ /dev/null @@ -1,55 +0,0 @@ -/* varobj support for Ada. - - Copyright (C) 2012-2013 Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef ADA_VAROBJ_H -#define ADA_VAROBJ_H - -#include "varobj.h" - -struct value; -struct value_print_options; - -extern int ada_varobj_get_number_of_children (struct value *parent_value, - struct type *parent_type); - -extern char *ada_varobj_get_name_of_child (struct value *parent_value, - struct type *parent_type, - const char *parent_name, - int child_index); - -extern char *ada_varobj_get_path_expr_of_child (struct value *parent_value, - struct type *parent_type, - const char *parent_name, - const char *parent_path_expr, - int child_index); - -extern struct value *ada_varobj_get_value_of_child (struct value *parent_value, - struct type *parent_type, - const char *parent_name, - int child_index); - -extern struct type *ada_varobj_get_type_of_child (struct value *parent_value, - struct type *parent_type, - int child_index); - -extern char *ada_varobj_get_value_of_variable - (struct value *value, struct type *type, - struct value_print_options *opts); - -#endif /* ADA_VAROBJ_H */ -- 1.7.7.6