[PING][PATCH] [bfd/mach-o] Add DWARF5 sections in dwarf_section_names_xlat

Tom de Vries tdevries@suse.de
Thu Nov 5 10:55:18 GMT 2026


On 11/5/26 10:12 AM, Jan Beulich wrote:
> 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?
> 

Hi Jan,

thanks for the review.

I'm sorry, I missed that reply completely.  I'll push shortly.

Thanks,
- Tom

> Jan
> 
> [1] https://sourceware.org/pipermail/binutils/2026-October/152296.html



More information about the Binutils mailing list