aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2016-04-27 14:18:29 -0700
committerIan Lance Taylor <iant@golang.org>2016-04-29 22:07:36 +0000
commit5f9a870bf1bf461ca3609502608b12cc4aab189a (patch)
tree8acea9b2b421e8a188b27872a00c935f3f8776c3 /src/runtime/runtime2.go
parentc717675c35cb436bdab62091a6288843aa1c863c (diff)
downloadgo-5f9a870bf1bf461ca3609502608b12cc4aab189a.tar.xz
cmd/cgo, runtime, runtime/cgo: use cgo context function
Add support for the context function set by runtime.SetCgoTraceback. The context function was added in CL 17761, without support. This CL is the support. This CL has not been tested for real C code, as a working context function for C code requires unwind support that does not seem to exist. I wanted to get the CL out before the freeze. I apologize for the length of this CL. It's mostly plumbing, but unfortunately the plumbing is processor-specific. Change-Id: I8ce11a0de9b3dafcc29efd2649d776e93bff0e90 Reviewed-on: https://go-review.googlesource.com/22508 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index d35b897c3e..7567639168 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -352,7 +352,8 @@ type g struct {
gopc uintptr // pc of go statement that created this goroutine
startpc uintptr // pc of goroutine function
racectx uintptr
- waiting *sudog // sudog structures this g is waiting on (that have a valid elem ptr); in lock order
+ waiting *sudog // sudog structures this g is waiting on (that have a valid elem ptr); in lock order
+ cgoCtxt []uintptr // cgo traceback context
// Per-G GC state