diff options
| author | Ian Lance Taylor <iant@golang.org> | 2016-05-27 10:05:52 -0700 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2016-05-31 21:17:40 +0000 |
| commit | 3d037cfaf8c70b8af87cb5d57553a7e3e9dc2117 (patch) | |
| tree | 217097c00ea85f856d669f0660de9413a18a8bf7 /src/runtime/testdata | |
| parent | c52dff0727c58cb7a6e768d91d15e3eaafcb420a (diff) | |
| download | go-3d037cfaf8c70b8af87cb5d57553a7e3e9dc2117.tar.xz | |
runtime: pass signal context to cgo traceback function
When doing a backtrace from a signal that occurs in C code compiled
without using -fasynchronous-unwind-tables, we have to rely on frame
pointers. In order to do that, the traceback function needs the signal
context to reliably pick up the frame pointer.
Change-Id: I7b45930fced01685c337d108e0f146057928f876
Reviewed-on: https://go-review.googlesource.com/23494
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/testdata')
| -rw-r--r-- | src/runtime/testdata/testprogcgo/pprof.go | 1 | ||||
| -rw-r--r-- | src/runtime/testdata/testprogcgo/traceback.go | 1 | ||||
| -rw-r--r-- | src/runtime/testdata/testprogcgo/tracebackctxt_c.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/testdata/testprogcgo/pprof.go b/src/runtime/testdata/testprogcgo/pprof.go index 04ac4fe92e..cb30ec5b25 100644 --- a/src/runtime/testdata/testprogcgo/pprof.go +++ b/src/runtime/testdata/testprogcgo/pprof.go @@ -30,6 +30,7 @@ static int cpuHogCount; struct cgoTracebackArg { uintptr_t context; + uintptr_t sigContext; uintptr_t* buf; uintptr_t max; }; diff --git a/src/runtime/testdata/testprogcgo/traceback.go b/src/runtime/testdata/testprogcgo/traceback.go index 38cdef537a..e8b0a04556 100644 --- a/src/runtime/testdata/testprogcgo/traceback.go +++ b/src/runtime/testdata/testprogcgo/traceback.go @@ -30,6 +30,7 @@ static int f1() { struct cgoTracebackArg { uintptr_t context; + uintptr_t sigContext; uintptr_t* buf; uintptr_t max; }; diff --git a/src/runtime/testdata/testprogcgo/tracebackctxt_c.c b/src/runtime/testdata/testprogcgo/tracebackctxt_c.c index bbac39658e..900cada0d3 100644 --- a/src/runtime/testdata/testprogcgo/tracebackctxt_c.c +++ b/src/runtime/testdata/testprogcgo/tracebackctxt_c.c @@ -26,6 +26,7 @@ struct cgoContextArg { struct cgoTracebackArg { uintptr_t context; + uintptr_t sigContext; uintptr_t* buf; uintptr_t max; }; |
