diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-05-17 05:30:25 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-05-17 05:30:25 +0000 |
commit | d7b8f2b7816952c96c769c62eca10c647caa3530 (patch) | |
tree | ee128f558640851fefb4f2a94c2d38f45b2ee2a0 /libgo/runtime/runtime.h | |
parent | 8730965e4297b5f96210b2e80e70c5b302486723 (diff) | |
download | gcc-d7b8f2b7816952c96c769c62eca10c647caa3530.tar.gz |
runtime: Print stack trace on panic or signal.
From-SVN: r187623
Diffstat (limited to 'libgo/runtime/runtime.h')
-rw-r--r-- | libgo/runtime/runtime.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h index 3e75b1583b8..91044184b1f 100644 --- a/libgo/runtime/runtime.h +++ b/libgo/runtime/runtime.h @@ -143,14 +143,16 @@ struct G M* m; // for debuggers, but offset not hard-coded M* lockedm; M* idlem; - // int32 sig; + int32 sig; int32 writenbuf; byte* writebuf; - // uintptr sigcode0; - // uintptr sigcode1; + uintptr sigcode0; + uintptr sigcode1; // uintptr sigpc; uintptr gopc; // pc of go statement that created this goroutine + G* dotraceback; + ucontext_t context; void* stack_context[10]; }; @@ -289,6 +291,11 @@ void* runtime_mal(uintptr); void runtime_schedinit(void); void runtime_initsig(void); void runtime_sigenable(uint32 sig); +int32 runtime_gotraceback(void); +void runtime_goroutineheader(G*); +void runtime_goroutinetrailer(G*); +void runtime_traceback(); +void runtime_tracebackothers(G*); String runtime_gostringnocopy(const byte*); void* runtime_mstart(void*); G* runtime_malg(int32, byte**, size_t*); @@ -434,6 +441,8 @@ void runtime_osyield(void); void runtime_LockOSThread(void) __asm__("runtime.LockOSThread"); void runtime_UnlockOSThread(void) __asm__("runtime.UnlockOSThread"); +bool runtime_showframe(const unsigned char*); + uintptr runtime_memlimit(void); // If appropriate, ask the operating system to control whether this @@ -468,3 +477,5 @@ void __go_register_gc_roots(struct root_list*); // This will be 0 when using split stacks, as in that case // the stacks are allocated by the splitstack library. extern uintptr runtime_stacks_sys; + +extern _Bool __go_file_line (uintptr, String*, String*, int *); |