From 5f6a9742982203d3851eb870b82eee60a426e858 Mon Sep 17 00:00:00 2001 From: Vincent Date: Sat, 16 May 2026 17:03:54 +0100 Subject: [PATCH] fix(visitor): ignore DW_AT_decl_file/line in visit_namespace Namespace DIEs can carry DW_AT_decl_file and DW_AT_decl_line, but the attribute match in visit_namespace had no skip-set, so those fell through to the catch-all and raised ValueError. Skip them, matching visit_typedef, visit_enumeration_type and the other visit_* methods. --- src/dwarf2cpp/visitor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dwarf2cpp/visitor.py b/src/dwarf2cpp/visitor.py index ab698d3..62ebfb8 100644 --- a/src/dwarf2cpp/visitor.py +++ b/src/dwarf2cpp/visitor.py @@ -216,6 +216,9 @@ def visit_namespace(self, die: DWARFDie) -> None: namespace = Namespace(name=die.short_name) for attribute in die.attributes: + if attribute.name in {"DW_AT_decl_file", "DW_AT_decl_line"}: + continue + match attribute.name: case "DW_AT_name": pass