Commit 9a5654ab authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

runtime: restore header to first goroutine in Stack

It appears to have been accidentally lost when converting
Stack from C to Go in https://golang.org/cl/129510043

LGTM=rsc
R=golang-codereviews
CC=golang-codereviews, josharian, khr, remyoudompheng, rsc
https://golang.org/cl/136870043
parent 25f6b02a
...@@ -164,6 +164,7 @@ func Stack(buf []byte, all bool) int { ...@@ -164,6 +164,7 @@ func Stack(buf []byte, all bool) int {
if len(buf) > 0 { if len(buf) > 0 {
gp.writebuf = &buf[0] gp.writebuf = &buf[0]
gp.writenbuf = int32(len(buf)) gp.writenbuf = int32(len(buf))
goroutineheader(gp)
traceback(pc, sp, 0, gp) traceback(pc, sp, 0, gp)
if all { if all {
tracebackothers(gp) tracebackothers(gp)
......
...@@ -216,6 +216,7 @@ func gonotetsleepg(n *note, t int64) { ...@@ -216,6 +216,7 @@ func gonotetsleepg(n *note, t int64) {
func exitsyscall() func exitsyscall()
func goroutineheader(gp *g)
func traceback(pc, sp, lr uintptr, gp *g) func traceback(pc, sp, lr uintptr, gp *g)
func tracebackothers(gp *g) func tracebackothers(gp *g)
......
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