Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH 7/7] Remove ada-varobj.h.
Date: Wed, 18 Sep 2013 13:55:00 -0000	[thread overview]
Message-ID: <1379512482-31773-8-git-send-email-yao@codesourcery.com> (raw)
In-Reply-To: <1379512482-31773-1-git-send-email-yao@codesourcery.com>

As a result of previous patch, extern functions in ada-varobj.c can be
made static, and ada-varobj.h can be removed too.

gdb:

2013-09-18  Yao Qi  <yao@codesourcery.com>

	* 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 73715b5..5c2874c 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -792,7 +792,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 3b01209..f921c67 100644
--- a/gdb/ada-varobj.c
+++ b/gdb/ada-varobj.c
@@ -18,7 +18,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "ada-varobj.h"
 #include "ada-lang.h"
 #include "lang-varobj.h"
 #include "language.h"
@@ -57,6 +56,9 @@
 
    The results are written in place.  */
 
+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)
 {
@@ -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 <http://www.gnu.org/licenses/>.  */
-
-#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


  parent reply	other threads:[~2013-09-18 13:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18 13:55 [RFC 0/7] Move language-related stuff out of varobj.c Yao Qi
2013-09-18 13:55 ` [PATCH 3/7] Remove field value_of_root Yao Qi
2013-10-01 10:16   ` Joel Brobecker
2013-10-01 13:52     ` Yao Qi
2013-09-18 13:55 ` Yao Qi [this message]
2013-10-17  5:46   ` [PATCH 7/7] Remove ada-varobj.h Joel Brobecker
2013-10-17 13:34     ` Yao Qi
2013-09-18 13:55 ` [PATCH 2/7] Remove vlang_unknown Yao Qi
2013-10-01 10:07   ` Joel Brobecker
2013-10-01 13:34     ` Yao Qi
2013-10-02  0:19       ` Doug Evans
2013-10-02  9:32         ` Joel Brobecker
2013-10-04  8:31           ` Yao Qi
2013-09-18 13:55 ` [PATCH 1/7] Remove field language in struct language_specific Yao Qi
2013-10-01 10:03   ` Joel Brobecker
2013-10-01 13:35     ` Yao Qi
2013-09-18 13:55 ` [PATCH 6/7] Move language stuff out of varobj.c Yao Qi
2013-10-11  8:20   ` Yao Qi
2013-10-17  5:40     ` Joel Brobecker
2013-10-17 13:33       ` Yao Qi
2013-09-18 13:55 ` [PATCH 4/7] Move struct varobj to varobj.h Yao Qi
2013-10-02  9:46   ` Joel Brobecker
2013-10-02 19:32     ` Doug Evans
2013-10-06  6:33     ` Yao Qi
2013-10-08  4:56       ` Joel Brobecker
2013-10-08 21:03         ` Doug Evans
2013-10-09  0:28         ` Yao Qi
2013-10-14  8:19         ` Yao Qi
2013-09-18 13:55 ` [PATCH 5/7] New lang-varobj.h Yao Qi
2013-10-02 17:18   ` Doug Evans
2013-10-08  4:59     ` Joel Brobecker
2013-10-09 23:51       ` Yao Qi
2013-10-09 23:56         ` Doug Evans
2013-10-10  0:19           ` Yao Qi
2013-09-28  0:56 ` [RFC 0/7] Move language-related stuff out of varobj.c Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379512482-31773-8-git-send-email-yao@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox