aboutsummaryrefslogtreecommitdiff
path: root/std/debug.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-01-24 01:58:20 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-01-24 02:02:48 -0500
commit4b3f18de3c5746b2ecfd6183351913de0909a83b (patch)
treee3d0d56fcd8c00d994a13c4d69d60f0ab28fe389 /std/debug.zig
parent32d8686da80d282e8cd6d84a0e5c331d269a1f69 (diff)
downloadzig-4b3f18de3c5746b2ecfd6183351913de0909a83b.tar.gz
zig-4b3f18de3c5746b2ecfd6183351913de0909a83b.zip
printf var args proof of concept
See #167 Need to troubleshoot when we send 2 slices to printf. It goes into an infinite loop. This commit introduces 4 builtin functions: * `@isInteger` * `@isFloat` * `@canImplictCast` * `@typeName`
Diffstat (limited to 'std/debug.zig')
-rw-r--r--std/debug.zig5
1 files changed, 1 insertions, 4 deletions
diff --git a/std/debug.zig b/std/debug.zig
index 4051ff123a..15aebf3a23 100644
--- a/std/debug.zig
+++ b/std/debug.zig
@@ -50,10 +50,7 @@ pub fn writeStackTrace(out_stream: &io.OutStream) -> %void {
const compile_unit = findCompileUnit(st, return_address) ?? return error.MissingDebugInfo;
const name = %return compile_unit.die.getAttrString(st, DW.AT_name);
- %return out_stream.printInt(usize, return_address);
- %return out_stream.printf(" -> ");
- %return out_stream.printf(name);
- %return out_stream.printf("\n");
+ %return out_stream.printf("{} -> {}\n", return_address, name);
maybe_fp = *(&const ?&const u8)(fp);
}
},