From 50104cc32a498f7517a51c8dc93106c51c7a54b4 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Wed, 20 Apr 2011 15:44:41 +0200 Subject: Imported Upstream version 2011.03.07.1 --- src/pkg/runtime/darwin/amd64/signal.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/pkg/runtime/darwin/amd64/signal.c') diff --git a/src/pkg/runtime/darwin/amd64/signal.c b/src/pkg/runtime/darwin/amd64/signal.c index 948b6c9c2..402ab33ca 100644 --- a/src/pkg/runtime/darwin/amd64/signal.c +++ b/src/pkg/runtime/darwin/amd64/signal.c @@ -42,12 +42,11 @@ runtime·signame(int32 sig) } void -runtime·sighandler(int32 sig, Siginfo *info, void *context) +runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp) { Ucontext *uc; Mcontext *mc; Regs *r; - G *gp; uintptr *sp; byte *pc; @@ -55,7 +54,7 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context) mc = uc->uc_mcontext; r = &mc->ss; - if((gp = m->curg) != nil && (runtime·sigtab[sig].flags & SigPanic)) { + if(gp != nil && (runtime·sigtab[sig].flags & SigPanic)) { // Work around Leopard bug that doesn't set FPE_INTDIV. // Look at instruction to see if it is a divide. // Not necessary in Snow Leopard (si_code will be != 0). @@ -113,12 +112,11 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context) runtime·printf("\n"); if(runtime·gotraceback()){ - runtime·traceback((void*)r->rip, (void*)r->rsp, 0, g); - runtime·tracebackothers(g); + runtime·traceback((void*)r->rip, (void*)r->rsp, 0, gp); + runtime·tracebackothers(gp); runtime·dumpregs(r); } - runtime·breakpoint(); runtime·exit(2); } -- cgit v1.2.3