]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: print sigcode on signal crash
authorRuss Cox <rsc@golang.org>
Thu, 27 Oct 2016 16:43:37 +0000 (12:43 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 27 Oct 2016 17:46:01 +0000 (17:46 +0000)
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>
src/runtime/signal_sighandler.go

index 8f12011ba8c7d78e19ae9410b437387c17257f4a..5af12d7b2fedb8c42aa4c2349f26e07ce6c95cb6 100644 (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