diff options
Diffstat (limited to 'src/runtime/traceback.go')
-rw-r--r-- | src/runtime/traceback.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go index 49147ff838..6df0bbfabe 100644 --- a/src/runtime/traceback.go +++ b/src/runtime/traceback.go @@ -923,8 +923,8 @@ func gcallers(gp *g, skip int, pcbuf []uintptr) int { // showframe reports whether the frame with the given characteristics should // be printed during a traceback. func showframe(f funcInfo, gp *g, firstFrame bool, funcID, childID funcID) bool { - g := getg() - if g.m.throwing >= throwTypeRuntime && gp != nil && (gp == g.m.curg || gp == g.m.caughtsig.ptr()) { + mp := getg().m + if mp.throwing >= throwTypeRuntime && gp != nil && (gp == mp.curg || gp == mp.caughtsig.ptr()) { return true } return showfuncinfo(f, firstFrame, funcID, childID) @@ -1051,10 +1051,10 @@ func tracebackothers(me *g) { } print("\n") goroutineheader(gp) - // Note: gp.m == g.m occurs when tracebackothers is - // called from a signal handler initiated during a - // systemstack call. The original G is still in the - // running state, and we want to print its stack. + // Note: gp.m == getg().m occurs when tracebackothers is called + // from a signal handler initiated during a systemstack call. + // The original G is still in the running state, and we want to + // print its stack. if gp.m != getg().m && readgstatus(gp)&^_Gscan == _Grunning { print("\tgoroutine running on other thread; stack unavailable\n") printcreatedby(gp) |