1
0
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:
Russ Cox 2011-02-23 15:42:13 -05:00
parent e0a2c5d4b5
commit 59ce067da8
7 changed files with 0 additions and 7 deletions

View File

@ -107,7 +107,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
runtime·dumpregs(r);
}
runtime·breakpoint();
runtime·exit(2);
}

View File

@ -117,7 +117,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
runtime·dumpregs(r);
}
runtime·breakpoint();
runtime·exit(2);
}

View File

@ -103,7 +103,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
runtime·dumpregs(r);
}
runtime·breakpoint();
runtime·exit(2);
}

View File

@ -111,7 +111,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
runtime·dumpregs(r);
}
runtime·breakpoint();
runtime·exit(2);
}

View File

@ -100,7 +100,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
runtime·dumpregs(r);
}
runtime·breakpoint();
runtime·exit(2);
}

View File

@ -110,7 +110,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
runtime·dumpregs(r);
}
runtime·breakpoint();
runtime·exit(2);
}

View File

@ -85,7 +85,6 @@ runtime·sighandler(ExceptionRecord *info, void *frame, Context *r)
runtime·dumpregs(r);
}
runtime·breakpoint();
runtime·exit(2);
return 0;
}