mirror of
https://github.com/golang/go
synced 2024-11-20 05:14:41 -07:00
runtime: omit breakpoint during terminal panic
A terminal panic (one that prints a stack trace and exits) has been calling runtime.breakpoint before calling exit, so that if running under a debugger, the debugger can take control. When not running under a debugger, though, this causes an additional SIGTRAP on Unix and pop-up dialogs on Windows. Support for debugging Go programs has gotten good enough that we can rely on the debugger to set its own breakpoint on runtime.exit if it wants to look around. R=r, r2 CC=golang-dev https://golang.org/cl/4222043
This commit is contained in:
parent
e0a2c5d4b5
commit
59ce067da8
@ -107,7 +107,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
runtime·dumpregs(r);
|
||||
}
|
||||
|
||||
runtime·breakpoint();
|
||||
runtime·exit(2);
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
runtime·dumpregs(r);
|
||||
}
|
||||
|
||||
runtime·breakpoint();
|
||||
runtime·exit(2);
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
runtime·dumpregs(r);
|
||||
}
|
||||
|
||||
runtime·breakpoint();
|
||||
runtime·exit(2);
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
runtime·dumpregs(r);
|
||||
}
|
||||
|
||||
runtime·breakpoint();
|
||||
runtime·exit(2);
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
runtime·dumpregs(r);
|
||||
}
|
||||
|
||||
runtime·breakpoint();
|
||||
runtime·exit(2);
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
runtime·dumpregs(r);
|
||||
}
|
||||
|
||||
runtime·breakpoint();
|
||||
runtime·exit(2);
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,6 @@ runtime·sighandler(ExceptionRecord *info, void *frame, Context *r)
|
||||
runtime·dumpregs(r);
|
||||
}
|
||||
|
||||
runtime·breakpoint();
|
||||
runtime·exit(2);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user