]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo, runtime, runtime/cgo: use cgo context function
authorIan Lance Taylor <iant@golang.org>
Wed, 27 Apr 2016 21:18:29 +0000 (14:18 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 29 Apr 2016 22:07:36 +0000 (22:07 +0000)
commit5f9a870bf1bf461ca3609502608b12cc4aab189a
tree8acea9b2b421e8a188b27872a00c935f3f8776c3
parentc717675c35cb436bdab62091a6288843aa1c863c
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>
27 files changed:
src/cmd/cgo/doc.go
src/cmd/cgo/out.go
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_arm.s
src/runtime/asm_arm64.s
src/runtime/asm_ppc64x.s
src/runtime/asm_s390x.s
src/runtime/cgo.go
src/runtime/cgo/asm_386.s
src/runtime/cgo/asm_amd64.s
src/runtime/cgo/asm_arm.s
src/runtime/cgo/asm_arm64.s
src/runtime/cgo/asm_ppc64x.s
src/runtime/cgo/asm_s390x.s
src/runtime/cgo/callbacks.go
src/runtime/cgo/gcc_context.c [new file with mode: 0644]
src/runtime/cgo/gcc_libinit.c
src/runtime/cgo/gcc_libinit_openbsd.c
src/runtime/cgo/gcc_libinit_windows.c
src/runtime/cgo/libcgo.h
src/runtime/cgocall.go
src/runtime/crash_cgo_test.go
src/runtime/runtime2.go
src/runtime/symtab.go
src/runtime/testdata/testprogcgo/tracebackctxt.go [new file with mode: 0644]
src/runtime/traceback.go