if (suffix && strcmp (suffix, ".dwo") == 0)
is_dwo = true;
- load_debug_section_with_follow (str, file);
+ if (is_dwo)
+ {
+ load_debug_section_with_follow (str_dwo, file);
+ load_debug_section_with_follow (str_index_dwo, file);
+ }
+ else
+ {
+ load_debug_section_with_follow (str, file);
+ load_debug_section_with_follow (str_index, file);
+ }
load_debug_section_with_follow (line, file);
- load_debug_section_with_follow (str_index, file);
introduce (section, false);
READ_ULEB (lineno, curr, end);
READ_ULEB (offset, curr, end);
string = (const unsigned char *)
- fetch_indexed_string (offset, NULL, offset_size, false, 0);
+ fetch_indexed_string (offset, NULL, offset_size, is_dwo, 0);
if (op == DW_MACRO_define_strx)
printf (" DW_MACRO_define_strx ");
else
-#name: readelf -ws readelf-debug-str-offsets-dw4
+#name: readelf -wsm readelf-debug-str-offsets-dw4
#source: readelf-debug-str-offsets-dw4.s
-#readelf: -ws
+#readelf: -wsm
Contents of the .debug_str.dwo section:
Index Offset \[String\]
0 00000000 FIRST
1 00000006 SECOND
+Contents of the .debug_macro.dwo section:
+
+ Offset: 0
+ Version: 4
+ Offset size: 4
+
+ DW_MACRO_define_strx lineno : 0 macro : FIRST
.section .debug_str_offsets.dwo,"MS",%progbits,1
.4byte 0
.4byte 6
+ .section .debug_macro.dwo,"e",%progbits
+ .2byte 0x4 /* DWARF macro version number. */
+ .byte 0x0 /* Flags: 32-bit dwarf. */
+ .byte 0xb /* Define macro strx. */
+ .uleb128 0 /* At line number 0. */
+ .uleb128 0x0 /* .debug_str_offsets.dwo entry 0. */
+ .byte 0 /* End compilation unit. */