From 7b0542d08b7e8e5ccbe81f495d641305b3b8a264 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 26 Apr 2017 19:17:05 -0400 Subject: build system: consolidate duplicate code and more * add ability to add assembly files when building an exe, obj, or lib * add implicit cast from `[N]T` to `?[]const T` (closes #343) * remove link_exe and link_lib in favor of allowing build_exe and build_lib support no root zig source file --- std/debug.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'std/debug.zig') diff --git a/std/debug.zig b/std/debug.zig index 862a7d96b8..cbd12dc639 100644 --- a/std/debug.zig +++ b/std/debug.zig @@ -90,7 +90,11 @@ pub fn writeStackTrace(out_stream: &io.OutStream, allocator: &mem.Allocator, tty // at compile time. I'll call it issue #313 const ptr_hex = if (@sizeOf(usize) == 4) "0x{x8}" else "0x{x16}"; - const compile_unit = findCompileUnit(st, return_address) ?? return error.MissingDebugInfo; + const compile_unit = findCompileUnit(st, return_address) ?? { + %return out_stream.print(DIM ++ ptr_hex ++ " in ??? (???)" ++ RESET ++ "\n\n\n", return_address); + %return out_stream.flush(); + continue; + }; const compile_unit_name = %return compile_unit.die.getAttrString(st, DW.AT_name); try (getLineNumberInfo(st, compile_unit, usize(return_address) - 1)) |line_info| { defer line_info.deinit(); -- cgit v1.2.3