From 21704afb857933323c2c2adf8afa79fcf0992633 Mon Sep 17 00:00:00 2001 From: dbalatoni13 <40299962+dbalatoni13@users.noreply.github.com> Date: Tue, 6 Jan 2026 04:43:49 +0100 Subject: [PATCH 1/2] Revert my own change that completely messes up array typedefs --- src/cmd/dwarf.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/cmd/dwarf.rs b/src/cmd/dwarf.rs index f398d44..70d73ae 100644 --- a/src/cmd/dwarf.rs +++ b/src/cmd/dwarf.rs @@ -254,22 +254,6 @@ where // pre-parse step for &child in &children { preprocess_cu_tag(&info, child); - - if let TagKind::Typedef = child.kind { - // TODO fundamental typedefs? - if let Some(ud_type_ref) = - child.reference_attribute(AttributeKind::UserDefType) - { - match typedefs.entry(ud_type_ref) { - btree_map::Entry::Vacant(e) => { - e.insert(vec![child.key]); - } - btree_map::Entry::Occupied(e) => { - e.into_mut().push(child.key); - } - } - } - } } for &child in &children { let tag_type = match process_cu_tag(&info, child) { @@ -309,6 +293,22 @@ where continue; } } + + if let TagKind::Typedef = child.kind { + // TODO fundamental typedefs? + if let Some(ud_type_ref) = + child.reference_attribute(AttributeKind::UserDefType) + { + match typedefs.entry(ud_type_ref) { + btree_map::Entry::Vacant(e) => { + e.insert(vec![child.key]); + } + btree_map::Entry::Occupied(e) => { + e.into_mut().push(child.key); + } + } + } + } } } kind => bail!("Unhandled root tag type {:?}", kind), From a3f649a7b4d6878a1517be8d027842322f999735 Mon Sep 17 00:00:00 2001 From: dbalatoni13 <40299962+dbalatoni13@users.noreply.github.com> Date: Tue, 6 Jan 2026 04:45:31 +0100 Subject: [PATCH 2/2] Fix formatting --- src/cmd/dwarf.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/dwarf.rs b/src/cmd/dwarf.rs index 70d73ae..3cda39d 100644 --- a/src/cmd/dwarf.rs +++ b/src/cmd/dwarf.rs @@ -293,7 +293,7 @@ where continue; } } - + if let TagKind::Typedef = child.kind { // TODO fundamental typedefs? if let Some(ud_type_ref) =