1
0
mirror of https://github.com/golang/go synced 2024-11-23 06:20:07 -07:00

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
This commit is contained in:
Brad Fitzpatrick 2014-08-27 09:31:32 -07:00
parent 25f6b02ab0
commit 9a5654abef
2 changed files with 2 additions and 0 deletions

View File

@ -164,6 +164,7 @@ func Stack(buf []byte, all bool) int {
if len(buf) > 0 {
gp.writebuf = &buf[0]
gp.writenbuf = int32(len(buf))
goroutineheader(gp)
traceback(pc, sp, 0, gp)
if all {
tracebackothers(gp)

View File

@ -216,6 +216,7 @@ func gonotetsleepg(n *note, t int64) {
func exitsyscall()
func goroutineheader(gp *g)
func traceback(pc, sp, lr uintptr, gp *g)
func tracebackothers(gp *g)