[PATCH 1/4] Recognize some new DWARF5 .debug sections.

Mark Wielaard mark@klomp.org
Mon Sep 14 10:23:52 GMT 2020


Recognize .debug_loclists, .debug_rnglists, .debug_line_str. loclists,
rnglists and line_str cannot be moved into a supplemental file.

We already handle .debug_macro (the replacement for .debug_macinfo).
.debug_pubnames and .debug_pubtypes are no more, but we deleted them
already when found. There is a standardized variant of .gdb_index,
.debug_names, but gdb works fine with .gdb_index even for DWARF5, so
just keep supporting .gdb_index for now.

There are two new sections .debug_addr and .debug_str_offsets which
are only emitted in split-dwarf mode by GCC. For now we don't recognize
those because we don't handle split-dwarf.

Finally there is .debug_sup which is the standardized variant of
.gnu_debugaltlink. Which we should generate when operating in "full"
DWARF5 mode. But that would require changes to some consumers.

	* dwz.c (enum debug_section_kind): Add DEBUG_LOCLISTS,
	DEBUG_RNGLISTS and DEBUG_LINE_STR.
	(debug_sections): Add .debug_loclists, .debug_rnglists and
	.debug_line_str.
---
 dwz.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dwz.c b/dwz.c
index 7ec0623..6a4c96c 100644
--- a/dwz.c
+++ b/dwz.c
@@ -687,8 +687,11 @@ enum debug_section_kind
   DEBUG_GNU_PUBTYPES,
   DEBUG_MACINFO,
   DEBUG_LOC,
+  DEBUG_LOCLISTS,
   DEBUG_FRAME,
   DEBUG_RANGES,
+  DEBUG_RNGLISTS,
+  DEBUG_LINE_STR,
   DEBUG_GDB_SCRIPTS,
   GDB_INDEX,
   GNU_DEBUGALTLINK,
@@ -720,8 +723,11 @@ static struct
     { ".debug_gnu_pubtypes", NULL, NULL, 0, 0, 0 },
     { ".debug_macinfo", NULL, NULL, 0, 0, 0 },
     { ".debug_loc", NULL, NULL, 0, 0, 0 },
+    { ".debug_loclists", NULL, NULL, 0, 0, 0 },
     { ".debug_frame", NULL, NULL, 0, 0, 0 },
     { ".debug_ranges", NULL, NULL, 0, 0, 0 },
+    { ".debug_rnglists", NULL, NULL, 0, 0, 0 },
+    { ".debug_line_str", NULL, NULL, 0, 0, 0 },
     { ".debug_gdb_scripts", NULL, NULL, 0, 0, 0 },
     { ".gdb_index", NULL, NULL, 0, 0, 0 },
     { ".gnu_debugaltlink", NULL, NULL, 0, 0, 0 },
-- 
2.18.4



More information about the Dwz mailing list