Files
binutils-gdb/binutils/testsuite/binutils-all/readelf-debug-str-offsets-dw4.s
Tom de Vries e548840a03 [binutils/readelf] Fix handling of DW_MACRO_define_strx in dwo file
When printing a DW_MACRO_define_strx entry in a .debug_macro.dwo section, we
run into:
...
 DW_MACRO_define_strx lineno : 0 macro : <no .debug_str_offsets section>
...

Fix this in display_debug_macro by passing the correct dwo argument to a
fetch_indexed_string call.

That works fine for readelf -w, with with readelf -wm we have:
...
 DW_MACRO_define_strx lineno : 0 macro : <no .debug_str_offsets.dwo section>
...

Fix this in display_debug_macro by doing load_debug_section_with_follow for
str_dwo / str_index_dwo sections instead of str / str_index sections when
handling .debug_macro.dwo.

PR 31735
2024-05-15 09:45:55 +02:00

14 lines
477 B
ArmAsm

.section .debug_str.dwo,"MS",%progbits,1
.asciz "FIRST"
.asciz "SECOND"
.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. */