]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Update DW_LANG codes
authorMark Wielaard <mark@klomp.org>
Fri, 22 Nov 2024 17:17:29 +0000 (18:17 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 2 Dec 2024 17:58:14 +0000 (18:58 +0100)
commit04ba163e813f6b88da850c658a03ac7b5f19f7ad
treeb0971d186c03ddaafa53ebad26597269d9305478
parent8a0a7cf93eeec6f5873529145088b61b259112cc
libdw: Update DW_LANG codes

Pick up the language codes published after DWARF5 was published.
The are listed at https://dwarfstd.org/languages.html

Also adjust C language dectection in dwarf_getfuncs and update the
dwarf_default_lower_bound function to return the default lower bounds
for the new langauge codes.

There is one small change in dwarf_default_lower_bound. We now return
zero instead of an error when called for DW_LANG_Mips_Assembler. Since
there is now an "official" DW_LANG_Assembly which is explicitly
defined as having a default lower bound of zero. It seems better to do
the same for the vendor code too.

    * libdw/dwarf.h: Add new DW_LANG codes.
    * libdw/dwarf_default_lower_bound.c (dwarf_default_lower_bound):
    Handle new language codes and remove a special case for
    DW_LANG_Mips_Assembler.
    * libdw/dwarf_getfuncs.c (dwarf_getfuncs): Check against
    DW_LANG_C17 and DW_LANG_C23.
    * tests/dwarf_default_lower_bound.c: Also check for
    DW_LANG_Mips_Assembler.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/dwarf.h
libdw/dwarf_default_lower_bound.c
libdw/dwarf_getfuncs.c
tests/dwarf_default_lower_bound.c