From: Russ Cox Date: Thu, 27 Oct 2016 16:43:37 +0000 (-0400) Subject: runtime: print sigcode on signal crash X-Git-Tag: go1.8beta1~557 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=09692182fa79fcaf89aa08ccf74ad74562ccba04;p=gostls13.git runtime: print sigcode on signal crash For #17496. Change-Id: I671a59581c54d17bc272767eeb7b2742b54eca38 Reviewed-on: https://go-review.googlesource.com/32183 Run-TryBot: Russ Cox TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/runtime/signal_sighandler.go b/src/runtime/signal_sighandler.go index 8f12011ba8..5af12d7b2f 100644 --- a/src/runtime/signal_sighandler.go +++ b/src/runtime/signal_sighandler.go @@ -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