runtime: print sigcode on signal crash

For #17496.

Change-Id: I671a59581c54d17bc272767eeb7b2742b54eca38
Reviewed-on: https://go-review.googlesource.com/32183
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Russ Cox 2016-10-27 12:43:37 -04:00
parent 03d81b5ed9
commit 09692182fa
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
print("Signal ", sig, "\n")
}
print("PC=", hex(c.sigpc()), " m=", _g_.m.id, "\n")
print("PC=", hex(c.sigpc()), " m=", _g_.m.id, " sigcode=", c.sigcode(), "\n")
if _g_.m.lockedg != nil && _g_.m.ncgo > 0 && gp == _g_.m.g0 {
print("signal arrived during cgo execution\n")
gp = _g_.m.lockedg