[PING][PATCH] [bfd/mach-o] Add DWARF5 sections in dwarf_section_names_xlat
Jan Beulich
jbeulich@suse.com
Thu Nov 5 09:12:35 GMT 2026
On 05.11.2026 09:53, Tom de Vries wrote:
>> I built gdb on macos aarch64, using the gdb.rb formula of homebrew [1]:
>> --target=x86_64-apple-darwin20 --enable-targets=all.
>>
>> Then I tried compiling a hello world, and did:
>> ...
>> $ gdb -q -batch a.out -ex "list main"
>> ...
>> DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU \
>> at offset 0x0 \
>> [in module /Users/vries/gdb/a.out.dSYM/Contents/Resources/DWARF/a.out]
>> ...
>>
>> The error message is actually wrong, it's the .debug_str_offsets section that
>> gdb can't find.
>>
>> This is because that and other DWARF5 sections are not supported in the
>> dwarf_section_names_xlat table in bfd/mach-o.c.
>>
>> Fix this by adding the missing sections.
>>
>> Tested by rebuilding gdb, and getting instead:
>> ...
>> $ gdb -q -batch a.out -ex "list main"
>>
>> warning: .debug_names not created by gdb; ignoring
>> 1 #include <stdio.h>
>> 2
>> 3 int
>> 4 main (void)
>> 5 {
>> 6 printf ("hello\n");
>> 7 return 0;
>> 8 }
>> ...
>>
>
> Ping.
Did [1] not suffice? If so, who specifically are you sending the ping to?
Jan
[1] https://sourceware.org/pipermail/binutils/2026-October/152296.html
More information about the Binutils
mailing list