Commit 2fb87ddb authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

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
parent fb5e1e1f
...@@ -112,6 +112,7 @@ Throw: ...@@ -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");
......
...@@ -122,6 +122,7 @@ Throw: ...@@ -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");
......
...@@ -112,6 +112,7 @@ Throw: ...@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment