diff options
author | Ian Lance Taylor <iant@google.com> | 2012-03-05 17:07:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2012-03-05 17:07:37 +0000 |
commit | f92da88a31fce5a88809c176bbb213310fa3fc81 (patch) | |
tree | 5677a6d747dba0c3a83e09c1859e79bd3a599d6d | |
parent | 0551b4c998e9fa70b0a75562bcf40907b7985880 (diff) |
runtime: Implement runtime.Callers.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@184944 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libgo/runtime/go-callers.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgo/runtime/go-callers.c b/libgo/runtime/go-callers.c index 65babbe1221..0089c67e0cd 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); +} |