[01/26] Move some DWARF code out of symfile.h

Message ID 20210228203803.1693413-2-tom@tromey.com
State New
Headers show
Series
  • Allow multiple "partial" symtab readers per objfile
Related show

Commit Message

Tom Tromey Feb. 28, 2021, 8:37 p.m.
This moves a bit of the DWARF-specific code out of symfile.h and into
dwarf2/read.h.

gdb/ChangeLog
2021-02-28  Tom Tromey  <tom@tromey.com>

	* symfile.h (enum dwarf2_section_enum)
	(dwarf2_get_section_info): Move to dwarf2/read.h.
	* dwarf2/read.h (enum dwarf2_section_enum)
	(dwarf2_get_section_info): Move from symfile.h.
---
 gdb/ChangeLog     |  7 +++++++
 gdb/dwarf2/read.h | 11 +++++++++++
 gdb/symfile.h     | 11 -----------
 3 files changed, 18 insertions(+), 11 deletions(-)

-- 
2.26.2

Patch

diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index c7f6a111b8c..fbcd8ad0380 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -694,4 +694,15 @@  struct type *dwarf2_fetch_die_type_sect_off
 /* When non-zero, dump line number entries as they are read in.  */
 extern unsigned int dwarf_line_debug;
 
+/* Dwarf2 sections that can be accessed by dwarf2_get_section_info.  */
+enum dwarf2_section_enum {
+  DWARF2_DEBUG_FRAME,
+  DWARF2_EH_FRAME
+};
+
+extern void dwarf2_get_section_info (struct objfile *,
+                                     enum dwarf2_section_enum,
+				     asection **, const gdb_byte **,
+				     bfd_size_type *);
+
 #endif /* DWARF2READ_H */
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 23e2ad8c3a9..b7e2009b669 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -603,17 +603,6 @@  extern int dwarf2_has_info (struct objfile *,
 			    const struct dwarf2_debug_sections *,
 			    bool = false);
 
-/* Dwarf2 sections that can be accessed by dwarf2_get_section_info.  */
-enum dwarf2_section_enum {
-  DWARF2_DEBUG_FRAME,
-  DWARF2_EH_FRAME
-};
-
-extern void dwarf2_get_section_info (struct objfile *,
-				     enum dwarf2_section_enum,
-				     asection **, const gdb_byte **,
-				     bfd_size_type *);
-
 /* A DWARF names index variant.  */
 enum class dw_index_kind
 {