summaryrefslogtreecommitdiff
path: root/libgo/runtime/go-panic.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime/go-panic.c')
-rw-r--r--libgo/runtime/go-panic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libgo/runtime/go-panic.c b/libgo/runtime/go-panic.c
index 8b95cd4e4d1..23df57930b7 100644
--- a/libgo/runtime/go-panic.c
+++ b/libgo/runtime/go-panic.c
@@ -39,8 +39,11 @@ __printpanics (struct __go_panic_stack *p)
void
__go_panic (struct __go_empty_interface arg)
{
+ G *g;
struct __go_panic_stack *n;
+ g = runtime_g ();
+
n = (struct __go_panic_stack *) __go_alloc (sizeof (struct __go_panic_stack));
n->__arg = arg;
n->__next = g->panic;
@@ -98,10 +101,9 @@ __go_panic (struct __go_empty_interface arg)
/* The panic was not recovered. */
+ runtime_startpanic ();
__printpanics (g->panic);
-
- /* FIXME: We should dump a call stack here. */
- abort ();
+ runtime_dopanic (0);
}
/* This is used by the runtime library. */