diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-02-14 13:23:51 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-02-14 13:23:51 +0100 |
commit | 758ff64c69e34965f8af5b2d6ffd65e8d7ab2150 (patch) | |
tree | 6d6b34f8c678862fe9b56c945a7b63f68502c245 /src/pkg/runtime/runtime.c | |
parent | 3e45412327a2654a77944249962b3652e6142299 (diff) | |
download | golang-upstream/2011-02-01.1.tar.gz |
Imported Upstream version 2011-02-01.1upstream/2011-02-01.1
Diffstat (limited to 'src/pkg/runtime/runtime.c')
-rw-r--r-- | src/pkg/runtime/runtime.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/pkg/runtime/runtime.c b/src/pkg/runtime/runtime.c index 9d3efe966..284b1e458 100644 --- a/src/pkg/runtime/runtime.c +++ b/src/pkg/runtime/runtime.c @@ -30,11 +30,16 @@ runtime·dopanic(int32 unused) } runtime·panicking++; - runtime·printf("\npanic PC=%X\n", (uint64)(uintptr)&unused); + if(g->sig != 0) + runtime·printf("\n[signal %x code=%p addr=%p pc=%p]\n", + g->sig, g->sigcode0, g->sigcode1, g->sigpc); + + runtime·printf("\n"); if(runtime·gotraceback()){ runtime·traceback(runtime·getcallerpc(&unused), runtime·getcallersp(&unused), 0, g); runtime·tracebackothers(g); } + runtime·breakpoint(); // so we can grab it in a debugger runtime·exit(2); } @@ -79,6 +84,10 @@ runtime·panicstring(int8 *s) { Eface err; + if(m->gcing) { + runtime·printf("panic: %s\n", s); + runtime·throw("panic during gc"); + } runtime·newErrorString(runtime·gostringnocopy((byte*)s), &err); runtime·panic(err); } @@ -148,6 +157,7 @@ runtime·args(int32 c, uint8 **v) } int32 runtime·isplan9; +int32 runtime·iswindows; void runtime·goargs(void) |