mirror of
https://github.com/golang/go
synced 2024-10-06 08:00:07 +00:00
runtime: tricky replacements of g in traceback.go
Change-Id: I80e847451b697de049a01df051a73b5976b39d4a Reviewed-on: https://go-review.googlesource.com/c/go/+/418589 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
4509e951ec
commit
399f50c9d7
|
@ -923,8 +923,8 @@ func gcallers(gp *g, skip int, pcbuf []uintptr) int {
|
||||||
// showframe reports whether the frame with the given characteristics should
|
// showframe reports whether the frame with the given characteristics should
|
||||||
// be printed during a traceback.
|
// be printed during a traceback.
|
||||||
func showframe(f funcInfo, gp *g, firstFrame bool, funcID, childID funcID) bool {
|
func showframe(f funcInfo, gp *g, firstFrame bool, funcID, childID funcID) bool {
|
||||||
g := getg()
|
mp := getg().m
|
||||||
if g.m.throwing >= throwTypeRuntime && gp != nil && (gp == g.m.curg || gp == g.m.caughtsig.ptr()) {
|
if mp.throwing >= throwTypeRuntime && gp != nil && (gp == mp.curg || gp == mp.caughtsig.ptr()) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return showfuncinfo(f, firstFrame, funcID, childID)
|
return showfuncinfo(f, firstFrame, funcID, childID)
|
||||||
|
|
Loading…
Reference in a new issue