From f0876a1a940b67b3f6029dfd0b6a06348792dc04 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 24 Jul 2015 16:16:39 -0700 Subject: runtime: log all thread stack traces during GODEBUG=crash on Unix This extends https://golang.org/cl/2811, which only applied to Darwin and GNU/Linux, to all Unix systems. Fixes #9591. Change-Id: Iec3fb438564ba2924b15b447c0480f87c0bfd009 Reviewed-on: https://go-review.googlesource.com/12661 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Matthew Dempsky Reviewed-by: Russ Cox --- src/runtime/sys_linux_arm64.s | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/runtime/sys_linux_arm64.s') diff --git a/src/runtime/sys_linux_arm64.s b/src/runtime/sys_linux_arm64.s index 6e5cdcdf33..998484f121 100644 --- a/src/runtime/sys_linux_arm64.s +++ b/src/runtime/sys_linux_arm64.s @@ -32,7 +32,9 @@ #define SYS_getrlimit 163 #define SYS_madvise 233 #define SYS_mincore 232 +#define SYS_getpid 172 #define SYS_gettid 178 +#define SYS_kill 129 #define SYS_tkill 130 #define SYS_futex 98 #define SYS_sched_getaffinity 123 @@ -151,6 +153,15 @@ TEXT runtime·raise(SB),NOSPLIT,$-8 SVC RET +TEXT runtime·raiseproc(SB),NOSPLIT,$-8 + MOVD $SYS_getpid, R8 + SVC + MOVW R0, R0 // arg 1 pid + MOVW sig+0(FP), R1 // arg 2 + MOVD $SYS_kill, R8 + SVC + RET + TEXT runtime·setitimer(SB),NOSPLIT,$-8-24 MOVW mode+0(FP), R0 MOVD new+8(FP), R1 -- cgit v1.3