浏览代码

Update doc.odin

gingerBill 1 年之前
父节点
当前提交
7ee2c1084f
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      core/debug/trace/doc.odin

+ 3 - 2
core/debug/trace/doc.odin

@@ -19,10 +19,11 @@ Example:
 		}
 		runtime.print_byte('\n')
 
-		ctx := &global_trace_ctx
+		ctx := &trace_ctx
 		if !trace.in_resolve(ctx) {
+			buf: [64]trace.Frame
 			runtime.print_string("Debug Trace:\n")
-			frames := trace.frames(ctx, skip=1, allocator=context.temp_allocator)
+			frames := trace.frames(ctx, 1, buf[:])
 			for f, i in frames {
 				fl := trace.resolve(ctx, f, context.temp_allocator)
 				if fl.loc.file_path == "" && fl.loc.line == 0 {