From 61a02d9d1e1a35469530a47f4aa710ac49e6efae Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 9 Mar 2018 21:05:41 -0500 Subject: [PATCH] omit pad zeroes in debug stack traces --- std/debug/index.zig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/std/debug/index.zig b/std/debug/index.zig index b26800677f..147f9b7713 100644 --- a/std/debug/index.zig +++ b/std/debug/index.zig @@ -179,9 +179,7 @@ pub fn writeCurrentStackTrace(out_stream: var, allocator: &mem.Allocator, } fn printSourceAtAddress(debug_info: &ElfStackTrace, out_stream: var, address: usize) !void { - // TODO we really should be able to convert @sizeOf(usize) * 2 to a string literal - // at compile time. I'll call it issue #313 - const ptr_hex = if (@sizeOf(usize) == 4) "0x{x8}" else "0x{x16}"; + const ptr_hex = "0x{x}"; switch (builtin.os) { builtin.Os.windows => return error.UnsupportedDebugInfo,