[PATCH 1/5] libiberty: move DW_LANG_* definitions to dwarf2.def

Simon Marchi simon.marchi@efficios.com
Wed Feb 19 17:09:21 GMT 2025


On 2/19/25 11:22 AM, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
> 
> Simon> In order to get a "DW_LANG_* to string" function:
> Simon>   - move the "DW_LANG_*" definitions from dwarf2.h to dwarf2.def
> Simon>   - add the necessary macros in dwarf2.h to generate the enumeration
> Simon>   - add the necessary macros in dwarfnames.c to generate the "to string"
> Simon>     function
> 
> This is ok by me, but normally these patches have to go via gcc first.
> Though maybe bidirectional merging is ok now?  But OTOH libiberty may
> require separate approvals.

I can send the patch to gcc first.  I see that gcc's dwarf2.{h,def} has
some new things that need to be sync'ed anyway.

For binutils-gdb, I just thought that there might be other users of dwarf2.def in
the tree that would break if I don't update them to add the new macros.
I see that elfcpp/dwarf.h includes dwarf2.def, it probably needs to be
updated.  However, I didn't see anything break when doing a default
build of binutils-gdb, so I need to figure out who uses this.  At first
glance it seems to be gold.

Simon


More information about the Binutils mailing list