From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2210) id 9DF9E386F016; Thu, 20 Aug 2020 17:48:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9DF9E386F016 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Ken Brown To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: strace: ignore GCC exceptions X-Act-Checkin: newlib-cygwin X-Git-Author: Ken Brown X-Git-Refname: refs/heads/master X-Git-Oldrev: 14c0a4c67d4e8c296dac2f1fc6fb86da3b76d7fb X-Git-Newrev: a93a85a1ff3ca937dabb1d985381b27836ce1bfc Message-Id: <20200820174800.9DF9E386F016@sourceware.org> Date: Thu, 20 Aug 2020 17:48:00 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Aug 2020 17:48:00 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a93a85a1ff3ca937dabb1d985381b27836ce1bfc commit a93a85a1ff3ca937dabb1d985381b27836ce1bfc Author: Ken Brown Date: Thu Aug 20 09:47:47 2020 -0400 Cygwin: strace: ignore GCC exceptions Any C++ app that calls 'throw' on 64-bit Cygwin results in an exception of type STATUS_GCC_THROW (0x20474343) generated by the C++ runtime. Don't pollute the strace output by printing information about this and other GCC exceptions. Diff: --- winsup/utils/strace.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc index 9b6569a70..b96ad40c1 100644 --- a/winsup/utils/strace.cc +++ b/winsup/utils/strace.cc @@ -25,6 +25,7 @@ details. */ #include "../cygwin/include/sys/cygwin.h" #include "../cygwin/include/cygwin/version.h" #include "../cygwin/cygtls_padsize.h" +#include "../cygwin/gcc_seh.h" #include "path.h" #undef cygwin_internal #include "loadlib.h" @@ -790,6 +791,13 @@ proc_child (unsigned mask, FILE *ofile, pid_t pid) case STATUS_BREAKPOINT: case 0x406d1388: /* SetThreadName exception. */ break; +#ifdef __x86_64__ + case STATUS_GCC_THROW: + case STATUS_GCC_UNWIND: + case STATUS_GCC_FORCED: + status = DBG_EXCEPTION_NOT_HANDLED; + break; +#endif default: status = DBG_EXCEPTION_NOT_HANDLED; if (ev.u.Exception.dwFirstChance)