From 4b3f18de3c5746b2ecfd6183351913de0909a83b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 24 Jan 2017 01:58:20 -0500 Subject: 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` --- std/debug.zig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'std/debug.zig') 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); } }, -- cgit v1.2.3