[llvm] [llvm-dwarfdump] Support for DW_AT_language_name and DW_AT_language_version (PR #162449)
Michael Buch via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 9 23:54:01 PDT 2025
================
@@ -0,0 +1,35 @@
+# Demonstrate dumping DW_AT_language_version.
+# RUN: llvm-mc -triple=x86_64--linux -filetype=obj < %s | \
+# RUN: llvm-dwarfdump -v - | FileCheck %s
+
+# CHECK: .debug_abbrev contents:
+# CHECK: DW_AT_language_version DW_FORM_data4
+# CHECK: DW_AT_language_version DW_FORM_data2
+# CHECK: .debug_info contents:
+# CHECK: DW_AT_language_version [DW_FORM_data4] (201402)
----------------
Michael137 wrote:
That would be a neat addition. We'd have to detect the fact that there is a `DW_AT_language_name` present (I don't think the standard mandates that both attributes be present). Although it would be weird to have a version without a name. Might be worth asking the committee to clarify.
Either way, I'll do it as a follow-up. For now I wanted to just get the minimal dwarfdump support for testing these attributes
https://github.com/llvm/llvm-project/pull/162449
More information about the llvm-commits
mailing list