[RFA 01/15] Move some declarations to mdebugread.h

Tom Tromey
2018-05-10T22:24:40Z

This moves a couple of mdebugread-related declarations from symfile.h
to mdebugread.h, which seemed more appropriate.

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

* symfile.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
Don't declare.
* mipsread.c: Include mdebugread.h.
* mdebugread.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
Declare.
* elfread.c: Include mdebugread.h.
---
gdb/ChangeLog | 9 +++++++++
gdb/elfread.c | 1 +
gdb/mdebugread.h | 9 +++++++++
gdb/mipsread.c | 1 +
gdb/symfile.h | 11 -----------
5 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/gdb/elfread.c b/gdb/elfread.c
index b4b4a1b24c..ac3a17a890 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -47,6 +47,7 @@
#include "build-id.h"
#include "location.h"
#include "auxv.h"
+#include "mdebugread.h"

/* Forward declarations. */
extern const struct sym_fns elf_sym_fns_gdb_index;
diff --git a/gdb/mdebugread.h b/gdb/mdebugread.h
index a3a0c57a5e..817c5072a8 100644
--- a/gdb/mdebugread.h
+++ b/gdb/mdebugread.h
@@ -37,4 +37,13 @@ struct mdebug_extra_func_info

#define MDEBUG_EFI_SYMBOL_NAME "__GDB_EFI_INFO__"

+extern void mdebug_build_psymtabs (minimal_symbol_reader &,
+ struct objfile *,
+ const struct ecoff_debug_swap *,
+ struct ecoff_debug_info *);
+
+extern void elfmdebug_build_psymtabs (struct objfile *,
+ const struct ecoff_debug_swap *,
+ asection *);
+
#endif /* MDEBUGREAD_H */
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index 7b6ec2e48d..bff56b9b55 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -29,6 +29,7 @@
#include "objfiles.h"
#include "buildsym.h"
#include "stabsread.h"
+#include "mdebugread.h"

#include "coff/sym.h"
#include "coff/internal.h"
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 358e42b3f2..9c149c8922 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -610,17 +610,6 @@ extern void dwarf2_build_frame_info (struct objfile *);

void dwarf2_free_objfile (struct objfile *);

-/* From mdebugread.c */
-
-extern void mdebug_build_psymtabs (minimal_symbol_reader &,
- struct objfile *,
- const struct ecoff_debug_swap *,
- struct ecoff_debug_info *);
-
-extern void elfmdebug_build_psymtabs (struct objfile *,
- const struct ecoff_debug_swap *,
- asection *);
-
/* From minidebug.c. */

extern gdb_bfd_ref_ptr find_separate_debug_file_in_section (struct objfile *);
--
2.13.6