[PATCH 3/4] libdw: Make dwarf_srclang forward compatible with DW_AT_language_name

Aaron Merey amerey@redhat.com
Wed Mar 26 19:02:39 GMT 2025


Hi Mark,

On Tue, Mar 11, 2025 at 6:00 AM Mark Wielaard <mark@klomp.org> wrote:
>
> For programs which use dwarf_srclang it might be useful to translate a
> DW_LNAME (plus version) into a DW_LANG constant if there is no
> DW_AT_language constant, but there is a DW_AT_language_name (and
> DW_AT_language_version).
>
>         * libdw/dwarf_srclang.c (language_to_srclang): New function.
>         (dwarf_srclang): If there is no DW_AT_language, try
>         DW_AT_language_name and DW_AT_language_version, use
>         language_to_srclang.
>
> Signed-off-by: Mark Wielaard <mark@klomp.org>

LGTM.

Aaron



More information about the Elfutils-devel mailing list