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:
parent
25f6b02ab0
commit
9a5654abef
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user