Recognize new DWARF5 DW_LANG constants
commit7136316123c54aba37fdab166e1bf860e452a4ae
authorMark Wielaard <mark@klomp.org>
Fri, 6 Dec 2024 14:39:25 +0000 (6 15:39 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 9 Dec 2024 12:06:13 +0000 (9 13:06 +0100)
treed770d6f2e45afeee9e7df15ae76b73269a221759
parentc5552fe28b8d89ed5a92cc736fa00d7e336a3f2c
Recognize new DWARF5 DW_LANG constants

When using --read-var-info=yes readdwarf3 will try to read and
interpret the CU DW_AT_langauge attribute. Since DWARF5 was released a
number if new language constants have been introduced. See
https://dwarfstd.org/languages.html

GCC15 might start emitting some of these when switching to C23 by
default.

When valgrind --read-var-info=yes encounters an unknown DW_LANG
constant it will produce an error and stop processing any further
DWARF.

Recognize all currently known language constants. In particular
recognize DW_LANG_C17, DW_LANG_C23, DW_LANG_C_plus_plus_17,
DW_LANG_C_plus_plus_20, DW_LANG_C_plus_plus_23, DW_LANG_Fortran18,
DW_LANG_Fortran23, DW_LANG_Ada2005, DW_LANG_Ada2012 and DW_LANG_Rust.

https://bugs.kde.org/show_bug.cgi?id=497130
NEWS
coregrind/m_debuginfo/priv_d3basics.h
coregrind/m_debuginfo/readdwarf3.c