mirror of
https://github.com/ziglang/zig.git
synced 2024-11-29 00:22:33 +00:00
omit pad zeroes in debug stack traces
This commit is contained in:
parent
f25c1c6858
commit
61a02d9d1e
@ -179,9 +179,7 @@ pub fn writeCurrentStackTrace(out_stream: var, allocator: &mem.Allocator,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn printSourceAtAddress(debug_info: &ElfStackTrace, out_stream: var, address: usize) !void {
|
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
|
const ptr_hex = "0x{x}";
|
||||||
// at compile time. I'll call it issue #313
|
|
||||||
const ptr_hex = if (@sizeOf(usize) == 4) "0x{x8}" else "0x{x16}";
|
|
||||||
|
|
||||||
switch (builtin.os) {
|
switch (builtin.os) {
|
||||||
builtin.Os.windows => return error.UnsupportedDebugInfo,
|
builtin.Os.windows => return error.UnsupportedDebugInfo,
|
||||||
|
Loading…
Reference in New Issue
Block a user