From: Ken Brown <kbrown@cornell.edu>
To: cygwin-patches@cygwin.com
Subject: [PATCH 2/2] Cygwin: strace: ignore GCC exceptions
Date: Thu, 20 Aug 2020 10:56:00 -0400 [thread overview]
Message-ID: <20200820145600.21492-3-kbrown@cornell.edu> (raw)
In-Reply-To: <20200820145600.21492-1-kbrown@cornell.edu>
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.
---
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)
--
2.28.0
next prev parent reply other threads:[~2020-08-20 14:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 14:55 [PATCH 0/2] GCC exception codes Ken Brown
2020-08-20 14:55 ` [PATCH 1/2] Cygwin: add header defining " Ken Brown
2020-08-20 14:56 ` Ken Brown [this message]
2020-08-20 17:29 ` [PATCH 0/2] " Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200820145600.21492-3-kbrown@cornell.edu \
--to=kbrown@cornell.edu \
--cc=cygwin-patches@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).