[RFA 13/42] Remove buildsym_new_init

Tom Tromey
2018-05-23T04:59:13Z

buildsym_new_init is just an alias for buildsym_init. This removes
it. In the long run buildsym_init will also go away; this patch just
helps make things a bit clearer in the meantime.

gdb/ChangeLog
2018-05-22 Tom Tromey <tom@tromey.com>

* xcoffread.c (xcoff_new_init): Update.
* mipsread.c (mipscoff_new_init): Update.
* mdebugread.c (mdebug_build_psymtabs): Update.
* elfread.c (elf_new_init): Update.
* dbxread.c (dbx_new_init, coffstab_build_psymtabs)
(elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
* buildsym.h (buildsym_new_init): Don't declare.
* buildsym.c (buildsym_new_init): Remove.
---
gdb/ChangeLog | 11 +++++++++++
gdb/buildsym.c | 12 +-----------
gdb/buildsym.h | 4 +---
gdb/dbxread.c | 8 ++++----
gdb/elfread.c | 2 +-
gdb/mdebugread.c | 2 +-
gdb/mipsread.c | 2 +-
gdb/xcoffread.c | 2 +-
8 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 10c816efb3..6fe413be8a 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -1759,7 +1759,7 @@ get_last_source_start_addr ()
corresponding to a psymtab. */

void
-buildsym_init (void)
+buildsym_init ()
{
subfile_stack = NULL;

@@ -1783,13 +1783,3 @@ buildsym_init (void)
gdb_assert (pending_addrmap == NULL);
gdb_assert (buildsym_compunit == NULL);
}
-
-/* Initialize anything that needs initializing when a completely new
- symbol file is specified (not just adding some symbols from another
- file, e.g. a shared library). */
-
-void
-buildsym_new_init (void)
-{
- buildsym_init ();
-}
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index a6bed3c611..77fc5bdd3c 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -209,9 +209,7 @@ extern void augment_type_symtab (void);

extern void scan_file_globals (struct objfile *objfile);

-extern void buildsym_new_init (void);
-
-extern void buildsym_init (void);
+extern void buildsym_init ();

extern struct context_stack *push_context (int desc, CORE_ADDR valu);

diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index eed4a28b90..52241f620d 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -569,7 +569,7 @@ static void
dbx_new_init (struct objfile *ignore)
{
stabsread_new_init ();
- buildsym_new_init ();
+ buildsym_init ();
init_header_files ();
}

@@ -3104,7 +3104,7 @@ coffstab_build_psymtabs (struct objfile *objfile,
perror_with_name (name);

stabsread_new_init ();
- buildsym_new_init ();
+ buildsym_init ();
free_header_files ();
init_header_files ();

@@ -3193,7 +3193,7 @@ elfstab_build_psymtabs (struct objfile *objfile, asection *stabsect,
perror_with_name (name);

stabsread_new_init ();
- buildsym_new_init ();
+ buildsym_init ();
free_header_files ();
init_header_files ();

@@ -3293,7 +3293,7 @@ stabsect_build_psymtabs (struct objfile *objfile, char *stab_name,
perror_with_name (name);

stabsread_new_init ();
- buildsym_new_init ();
+ buildsym_init ();
free_header_files ();
init_header_files ();

diff --git a/gdb/elfread.c b/gdb/elfread.c
index b4b4a1b24c..8978f15e88 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1325,7 +1325,7 @@ static void
elf_new_init (struct objfile *ignore)
{
stabsread_new_init ();
- buildsym_new_init ();
+ buildsym_init ();
}

/* Perform any local cleanups required when we are done with a particular
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 3f0cdc74aa..e56e009589 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -345,7 +345,7 @@ mdebug_build_psymtabs (minimal_symbol_reader &reader,
debug_info = info;

stabsread_new_init ();
- buildsym_new_init ();
+ buildsym_init ();
free_header_files ();
init_header_files ();

diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index 7b6ec2e48d..3bdc50733d 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -54,7 +54,7 @@ static void
mipscoff_new_init (struct objfile *ignore)
{
stabsread_new_init ();
- buildsym_new_init ();
+ buildsym_init ();
}

/* Initialize to read a symbol file (nothing to do). */
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 8bb244618c..e9bb79c87a 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1925,7 +1925,7 @@ static void
xcoff_new_init (struct objfile *objfile)
{
stabsread_new_init ();
- buildsym_new_init ();
+ buildsym_init ();
}

/* Do initialization in preparation for reading symbols from OBJFILE.
--
2.13.6