diff options
author | Ian Lance Taylor <iant@golang.org> | 2015-12-11 17:16:48 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2016-04-01 04:13:44 +0000 |
commit | ea306ae625d001a43ef20163739593a21be51f97 (patch) | |
tree | 9123485cd4112995217584ee66e39c6f584533b2 /src/runtime/sys_linux_ppc64x.s | |
parent | b64f549ba95fb9115afb1db8ae594b9442c45a6e (diff) | |
download | go-ea306ae625d001a43ef20163739593a21be51f97.tar.gz go-ea306ae625d001a43ef20163739593a21be51f97.zip |
runtime: support symbolic backtrace of C code in a cgo crash
The new function runtime.SetCgoTraceback may be used to register stack
traceback and symbolizer functions, written in C, to do a stack
traceback from cgo code.
There is a sample implementation of runtime.SetCgoSymbolizer at
github.com/ianlancetaylor/cgosymbolizer. Just importing that package is
sufficient to get symbolic C backtraces.
Currently only supported on linux/amd64.
Change-Id: If96ee2eb41c6c7379d407b9561b87557bfe47341
Reviewed-on: https://go-review.googlesource.com/17761
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/sys_linux_ppc64x.s')
-rw-r--r-- | src/runtime/sys_linux_ppc64x.s | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s index d063e025a6..56b842ac01 100644 --- a/src/runtime/sys_linux_ppc64x.s +++ b/src/runtime/sys_linux_ppc64x.s @@ -243,6 +243,21 @@ TEXT runtime·_sigtramp(SB),NOSPLIT,$64 MOVD 24(R1), R2 RET +#ifdef GOARCH_ppc64le +// ppc64le doesn't need function descriptors +TEXT runtime·cgoSigtramp(SB),NOSPLIT,$0 +#else +// function descriptor for the real sigtramp +TEXT runtime·cgoSigtramp(SB),NOSPLIT|NOFRAME,$0 + DWORD $runtime·_cgoSigtramp(SB) + DWORD $0 + DWORD $0 +TEXT runtime·_cgoSigtramp(SB),NOSPLIT,$0 +#endif + MOVD $runtime·sigtramp(SB), R12 + MOVD R12, CTR + JMP (CTR) + TEXT runtime·mmap(SB),NOSPLIT|NOFRAME,$0 MOVD addr+0(FP), R3 MOVD n+8(FP), R4 |