From: ian Date: Thu, 28 Feb 2013 21:56:14 +0000 (+0000) Subject: runtime: Don't block SIGTRAP while creating a new thread. X-Git-Tag: upstream/4.9.2~7430 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=886edb46576eb3eabeea3a7d138d755e188437ab;p=platform%2Fupstream%2Flinaro-gcc.git runtime: Don't block SIGTRAP while creating a new thread. Thanks to Uros Bizjak. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196362 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index b59f4ac..9b563a5 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -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);