1
0
mirror of https://github.com/golang/go synced 2024-11-20 05:54:43 -07:00

runtime: print goroutine header on fault

I've just needed the G status on fault to debug runtime bug.
For some reason we print everything except header here.
Make it more informative and consistent.

R=rsc
CC=golang-codereviews
https://golang.org/cl/67870056
This commit is contained in:
Dmitriy Vyukov 2014-03-07 00:01:24 +04:00
parent fb5e1e1fa1
commit 2fb87ddb59
3 changed files with 3 additions and 0 deletions

View File

@ -112,6 +112,7 @@ Throw:
runtime·printf("\n"); runtime·printf("\n");
if(runtime·gotraceback(&crash)){ if(runtime·gotraceback(&crash)){
runtime·goroutineheader(gp);
runtime·traceback(SIG_EIP(info, ctxt), SIG_ESP(info, ctxt), 0, gp); runtime·traceback(SIG_EIP(info, ctxt), SIG_ESP(info, ctxt), 0, gp);
runtime·tracebackothers(gp); runtime·tracebackothers(gp);
runtime·printf("\n"); runtime·printf("\n");

View File

@ -122,6 +122,7 @@ Throw:
runtime·printf("\n"); runtime·printf("\n");
if(runtime·gotraceback(&crash)){ if(runtime·gotraceback(&crash)){
runtime·goroutineheader(gp);
runtime·traceback(SIG_RIP(info, ctxt), SIG_RSP(info, ctxt), 0, gp); runtime·traceback(SIG_RIP(info, ctxt), SIG_RSP(info, ctxt), 0, gp);
runtime·tracebackothers(gp); runtime·tracebackothers(gp);
runtime·printf("\n"); runtime·printf("\n");

View File

@ -112,6 +112,7 @@ Throw:
runtime·printf("\n"); runtime·printf("\n");
if(runtime·gotraceback(&crash)){ if(runtime·gotraceback(&crash)){
runtime·goroutineheader(gp);
runtime·traceback(SIG_PC(info, ctxt), SIG_SP(info, ctxt), SIG_LR(info, ctxt), gp); runtime·traceback(SIG_PC(info, ctxt), SIG_SP(info, ctxt), SIG_LR(info, ctxt), gp);
runtime·tracebackothers(gp); runtime·tracebackothers(gp);
runtime·printf("\n"); runtime·printf("\n");