runtime: Don't block SIGTRAP while creating a new thread.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Feb 2013 21:56:14 +0000 (21:56 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Feb 2013 21:56:14 +0000 (21:56 +0000)
Thanks to Uros Bizjak.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196362 138bc75d-0d04-0410-961f-82ee72b054a4

libgo/runtime/proc.c

index b59f4ac..9b563a5 100644 (file)
@@ -1256,6 +1256,12 @@ runtime_newm(void)
        // Block signals during pthread_create so that the new thread
        // starts with signals disabled.  It will enable them in minit.
        sigfillset(&clear);
+
+#ifdef SIGTRAP
+       // Blocking SIGTRAP reportedly breaks gdb on Alpha GNU/Linux.
+       sigdelset(&clear, SIGTRAP);
+#endif
+
        sigemptyset(&old);
        sigprocmask(SIG_BLOCK, &clear, &old);
        ret = pthread_create(&tid, &attr, runtime_mstart, mp);