From fa2af441f1d7f2daccf40e1e350e8a8bfdcfb9e8 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 2 Sep 2014 15:12:53 -0400 Subject: runtime: convert traceback*.c to Go The two converted files were nearly identical. Instead of continuing that duplication, I merged them into a single traceback.go. Tested on arm, amd64, amd64p32, and 386. LGTM=r R=golang-codereviews, remyoudompheng, dave, r CC=dvyukov, golang-codereviews, iant, khr https://golang.org/cl/134200044 --- src/pkg/runtime/heapdump.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/pkg/runtime/heapdump.c') diff --git a/src/pkg/runtime/heapdump.c b/src/pkg/runtime/heapdump.c index 3d0a23049d..63ffe68066 100644 --- a/src/pkg/runtime/heapdump.c +++ b/src/pkg/runtime/heapdump.c @@ -380,6 +380,7 @@ dumpgoroutine(G *gp) ChildInfo child; Defer *d; Panic *p; + bool (*fn)(Stkframe*, void*); if(gp->syscallstack != (uintptr)nil) { sp = gp->syscallsp; @@ -413,7 +414,8 @@ dumpgoroutine(G *gp) child.depth = 0; if(!ScanStackByFrames) runtime·throw("need frame info to dump stacks"); - runtime·gentraceback(pc, sp, lr, gp, 0, nil, 0x7fffffff, dumpframe, &child, false); + fn = dumpframe; + runtime·gentraceback(pc, sp, lr, gp, 0, nil, 0x7fffffff, &fn, &child, false); // dump defer & panic records for(d = gp->defer; d != nil; d = d->link) { -- cgit v1.3-5-g9baa