aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-03-05 17:07:37 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-03-05 17:07:37 +0000
commitc3f87aa90913654a711c671568ec5bf9488a4440 (patch)
tree5677a6d747dba0c3a83e09c1859e79bd3a599d6d
parentd28b0b0861af105bb15a5ed60488469a0dcbeb67 (diff)
downloadgcc-c3f87aa90913654a711c671568ec5bf9488a4440.zip
gcc-c3f87aa90913654a711c671568ec5bf9488a4440.tar.gz
gcc-c3f87aa90913654a711c671568ec5bf9488a4440.tar.bz2
runtime: Implement runtime.Callers.
From-SVN: r184944
-rw-r--r--libgo/runtime/go-callers.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libgo/runtime/go-callers.c b/libgo/runtime/go-callers.c
index 65babbe..0089c67 100644
--- a/libgo/runtime/go-callers.c
+++ b/libgo/runtime/go-callers.c
@@ -55,3 +55,12 @@ runtime_callers (int32 skip, uintptr *pcbuf, int32 m)
_Unwind_Backtrace (backtrace, &arg);
return arg.index;
}
+
+int Callers (int, struct __go_open_array)
+ __asm__ ("libgo_runtime.runtime.Callers");
+
+int
+Callers (int skip, struct __go_open_array pc)
+{
+ return runtime_callers (skip, (uintptr *) pc.__values, pc.__count);
+}