[PATCH] Cygwin: strace: ignore GCC exceptions
Ken Brown
kbrown@cornell.edu
Thu Aug 20 13:54:33 GMT 2020
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 | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
index 9b6569a70..2b317012d 100644
--- a/winsup/utils/strace.cc
+++ b/winsup/utils/strace.cc
@@ -790,6 +790,13 @@ proc_child (unsigned mask, FILE *ofile, pid_t pid)
case STATUS_BREAKPOINT:
case 0x406d1388: /* SetThreadName exception. */
break;
+#ifdef __x86_64__
+ case 0x20474343: /* STATUS_GCC_THROW. */
+ case 0x21474343: /* STATUS_GCC_UNWIND. */
+ case 0x22474343: /* STATUS_GCC_FORCED. */
+ status = DBG_EXCEPTION_NOT_HANDLED;
+ break;
+#endif
default:
status = DBG_EXCEPTION_NOT_HANDLED;
if (ev.u.Exception.dwFirstChance)
--
2.28.0
More information about the Cygwin-patches
mailing list