From 1f42d015ec368a39f9b733efc7162b0b5957c1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Balatoni?= <40299962+dbalatoni13@users.noreply.github.com> Date: Wed, 29 Apr 2026 00:33:55 +0200 Subject: [PATCH] Print array dimensions in the dwarf based on the compiler --- src/util/dwarf/print.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/util/dwarf/print.rs b/src/util/dwarf/print.rs index 7399ada0..f4fe989e 100644 --- a/src/util/dwarf/print.rs +++ b/src/util/dwarf/print.rs @@ -130,7 +130,13 @@ fn array_type_string( ); match dim.size { None => out.suffix.insert_str(0, "[]"), - Some(size) => out.suffix = format!("[{}]{}", size, out.suffix), + Some(size) => { + if info.producer == Producer::MWCC { + out.suffix = format!("[{}]{}", size, out.suffix); + } else { + out.suffix = format!("{}[{}]", out.suffix, size); + } + } }; } Ok(out)