summaryrefslogtreecommitdiff
path: root/libgo/runtime/runtime.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-05-17 05:30:25 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-05-17 05:30:25 +0000
commitd7b8f2b7816952c96c769c62eca10c647caa3530 (patch)
treeee128f558640851fefb4f2a94c2d38f45b2ee2a0 /libgo/runtime/runtime.h
parent8730965e4297b5f96210b2e80e70c5b302486723 (diff)
downloadgcc-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.h17
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 *);