diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-05 17:07:37 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-05 17:07:37 +0000 |
commit | 6275e0bf1997c2c9e394fdc0c1b6edc39f70af3e (patch) | |
tree | 5677a6d747dba0c3a83e09c1859e79bd3a599d6d /libgo/runtime | |
parent | 876d7b2146a66ac35d26d2545226a3869f555d5a (diff) | |
download | gcc-6275e0bf1997c2c9e394fdc0c1b6edc39f70af3e.tar.gz |
runtime: Implement runtime.Callers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184944 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime')
-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); +} |