runtime: Implement runtime.Callers.
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 5 Mar 2012 17:07:37 +0000 (17:07 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 5 Mar 2012 17:07:37 +0000 (17:07 +0000)
From-SVN: r184944

libgo/runtime/go-callers.c

index 65babbe12215360bd6d5488aee740090aaa71e9d..0089c67e0cd70fdf4ac3c01703c5b18ae2a34bec 100644 (file)
@@ -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);
+}