Bug 497130 - Recognize new DWARF5 DW_LANG constants
Summary: Recognize new DWARF5 DW_LANG constants
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Mark Wielaard
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-06 14:48 UTC by Mark Wielaard
Modified: 2024-12-09 13:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Recognize new DWARF5 DW_LANG constants (5.70 KB, text/plain)
2024-12-06 14:51 UTC, Mark Wielaard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2024-12-06 14:48:32 UTC
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.
Comment 1 Mark Wielaard 2024-12-06 14:51:15 UTC
Created attachment 176395 [details]
Recognize new DWARF5 DW_LANG constants

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.
Comment 2 Mark Wielaard 2024-12-09 12:12:08 UTC
commit 7136316123c54aba37fdab166e1bf860e452a4ae
Author: Mark Wielaard <mark@klomp.org>
Date:   Fri Dec 6 15:39:25 2024 +0100

    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
Comment 3 Mark Wielaard 2024-12-09 13:21:07 UTC
Also added to the VALGRIND_3_24_BRANCH