diff options
| author | Russ Cox <rsc@golang.org> | 2014-09-02 15:12:53 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-09-02 15:12:53 -0400 |
| commit | fa2af441f1d7f2daccf40e1e350e8a8bfdcfb9e8 (patch) | |
| tree | 2595445d11d3cb30ff2a2a054178d8311fc7919d /src/pkg/runtime/heapdump.c | |
| parent | 8e89f87158eb364330e4334d7084e290e07c66a8 (diff) | |
| download | go-fa2af441f1d7f2daccf40e1e350e8a8bfdcfb9e8.tar.xz | |
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
Diffstat (limited to 'src/pkg/runtime/heapdump.c')
| -rw-r--r-- | src/pkg/runtime/heapdump.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |
