Commit 59ce067d authored by Russ Cox's avatar Russ Cox

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
parent e0a2c5d4
......@@ -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;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment