From 09692182fa79fcaf89aa08ccf74ad74562ccba04 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 27 Oct 2016 12:43:37 -0400 Subject: [PATCH] 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 --- src/runtime/signal_sighandler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.48.1