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

login
register
mail settings
Submitter Tom Tromey
Date May 10, 2018, 10:23 p.m.
Message ID <20180510222357.27332-2-tom@tromey.com>
Download mbox | patch
Permalink /patch/27217/
State New
Headers show

Comments

Tom Tromey - May 10, 2018, 10:23 p.m.
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(-)

Patch

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 *);