From f5036d587fce5fd3e8199acbf3f186987147ec6a Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Mon, 30 Jun 2025 22:31:17 +0200 Subject: print error return trace if execv:ing qemu errors --- src/main.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.zig b/src/main.zig index 5ee36da..5eda854 100644 --- a/src/main.zig +++ b/src/main.zig @@ -73,13 +73,14 @@ pub fn main() !void { if (run) { out_file.close(); - std.debug.print("{}\n", .{std.process.execv( + const err = std.process.execv( allocator, if (target.cpu.arch == .riscv64 and target.os.tag == .linux) &.{out_path} else &.{ "qemu-riscv64", out_path.? }, - )}); + ); + std.debug.print("{}\n{any}\n", .{err, @errorReturnTrace()}); } } -- cgit v1.2.3