From 06da6a91c38deb69b3c6152c6fa960735b9ab5e5 Mon Sep 17 00:00:00 2001 From: Frederik Seiffert Date: Tue, 23 Mar 2021 11:38:55 +0100 Subject: [PATCH] Suppress EH debug logs in release builds. --- eh_personality.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eh_personality.c b/eh_personality.c index 123461d..65a65d2 100644 --- a/eh_personality.c +++ b/eh_personality.c @@ -194,8 +194,8 @@ void objc_exception_rethrow(struct _Unwind_Exception *e); void objc_exception_throw(id object) { struct thread_data *td = get_thread_data(); - fprintf(stderr, "Throwing %p, in flight exception: %p\n", object, td->lastThrownObject); - fprintf(stderr, "Exception caught by C++: %d\n", td->cxxCaughtException); + DEBUG_LOG("Throwing %p, in flight exception: %p\n", object, td->lastThrownObject); + DEBUG_LOG("Exception caught by C++: %d\n", td->cxxCaughtException); // If C++ caught the exception, then we may need to make C++ rethrow it if // we want to preserve exception state. Rethrows should be handled with // objc_exception_rethrow, but clang appears to do the wrong thing for some