]> Cypherpunks repositories - gostls13.git/commit
runtime: print g pointer in crash stack dump
authorCherry Mui <cherryyz@google.com>
Mon, 13 Nov 2023 17:31:31 +0000 (12:31 -0500)
committerCherry Mui <cherryyz@google.com>
Thu, 16 Nov 2023 21:52:15 +0000 (21:52 +0000)
commit3a9254636c35b8d99826b203e73f335fbcd07fa9
tree175c2ccefb7a645fb1d66feb90f9da76eb24120c
parent1ab9df4849d1bb527035ccf475cc5b7b4aa9b789
runtime: print g pointer in crash stack dump

When debugging a runtime crash with a stack trace, sometimes we
have the g pointer in some places (e.g. as an argument of a
traceback function), but the g's goid in some other places (the
stack trace of that goroutine), which are usually not easy to
match up. This CL makes it print the g pointer. This is only
printed in crash mode, so it doesn't change the usual user stack
trace.

Change-Id: I19140855bf020a327ab0619b665ec1d1c70cca8a
Reviewed-on: https://go-review.googlesource.com/c/go/+/541996
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/traceback.go