impr: Disable exception wrapping as it causes a lot of slowdowns

This commit is contained in:
WerWolv
2026-01-03 20:41:17 +01:00
parent 051cdfa305
commit 8fc2d6b225
2 changed files with 0 additions and 19 deletions

View File

@@ -79,9 +79,6 @@ endif()
if (IMHEX_TRACE_EXCEPTIONS)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_link_options(tracing ${LIBIMHEX_LIBRARY_TYPE_PUBLIC} "-Wl,--wrap=__cxa_throw")
target_compile_definitions(tracing ${LIBIMHEX_LIBRARY_TYPE_PRIVATE} HEX_WRAP_CXA_THROW)
target_link_options(tracing ${LIBIMHEX_LIBRARY_TYPE_PUBLIC} "-Wl,--wrap=_ZSt21__glibcxx_assert_failPKciS0_S0_")
target_compile_definitions(tracing ${LIBIMHEX_LIBRARY_TYPE_PRIVATE} HEX_WRAP_GLIBCXX_ASSERT_FAIL)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")

View File

@@ -30,22 +30,6 @@ namespace hex::trace {
}
#if defined(HEX_WRAP_CXA_THROW)
extern "C" {
[[noreturn]] void __real___cxa_throw(void* thrownException, std::type_info* type, void (*destructor)(void*));
[[noreturn]] void __wrap___cxa_throw(void* thrownException, std::type_info* type, void (*destructor)(void*)) {
if (hex::trace::s_threadExceptionCaptureEnabled)
hex::trace::s_lastExceptionStackTrace = hex::trace::getStackTrace();
__real___cxa_throw(thrownException, type, destructor);
}
}
#endif
#if defined(HEX_WRAP_GLIBCXX_ASSERT_FAIL)
extern "C" {