]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: omit breakpoint during terminal panic
authorRuss Cox <rsc@golang.org>
Wed, 23 Feb 2011 20:42:13 +0000 (15:42 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 23 Feb 2011 20:42:13 +0000 (15:42 -0500)
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

src/pkg/runtime/darwin/386/signal.c
src/pkg/runtime/darwin/amd64/signal.c
src/pkg/runtime/freebsd/386/signal.c
src/pkg/runtime/freebsd/amd64/signal.c
src/pkg/runtime/linux/386/signal.c
src/pkg/runtime/linux/amd64/signal.c
src/pkg/runtime/windows/386/signal.c

index dd3050f0336edfb50d1df7a51ce5b59055a32099..aeef5de3fcba42d404bdd72e83b0d70e75b35a87 100644 (file)
@@ -107,7 +107,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
                runtime·dumpregs(r);
        }
 
-       runtime·breakpoint();
        runtime·exit(2);
 }
 
index d12b12f3e6e2fe26301f97c563827580cc1e8172..402ab33ca01af74f21bfffd5748c884b7aaa29d7 100644 (file)
@@ -117,7 +117,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
                runtime·dumpregs(r);
        }
 
-       runtime·breakpoint();
        runtime·exit(2);
 }
 
index bf40c8bd02433ba91c66fad3375bb37d51c070db..8e9d7425649d862dec509262a2cfd1c8a9c943b7 100644 (file)
@@ -103,7 +103,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
                runtime·dumpregs(r);
        }
 
-       runtime·breakpoint();
        runtime·exit(2);
 }
 
index b2313fad32dc2c8917cfb7ed26436d0124e90fb9..f145371b47c2073fcfab7b188c878fee7902427c 100644 (file)
@@ -111,7 +111,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
                runtime·dumpregs(r);
        }
 
-       runtime·breakpoint();
        runtime·exit(2);
 }
 
index 7f20d058b85326b241e021942e29301b9a646ed5..bd918c7ea515e061021ca095cd9fae6436401eff 100644 (file)
@@ -100,7 +100,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
                runtime·dumpregs(r);
        }
 
-       runtime·breakpoint();
        runtime·exit(2);
 }
 
index 462f9a74d7afeaa10a3b287b54c23c7da4c14774..ea0932523e5f779db91e9bebba40364aa7de0b0d 100644 (file)
@@ -110,7 +110,6 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
                runtime·dumpregs(r);
        }
 
-       runtime·breakpoint();
        runtime·exit(2);
 }
 
index 90363691029e9d154f6a1ac164feedd262643be1..08b32a137bdd5526a817eb947546a76f68ee4e9e 100644 (file)
@@ -85,7 +85,6 @@ runtime·sighandler(ExceptionRecord *info, void *frame, Context *r)
                runtime·dumpregs(r);
        }
 
-       runtime·breakpoint();
        runtime·exit(2);
        return 0;
 }