summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2019-01-26 21:19:04 -0500
committerGravatar Lioncash2019-01-26 21:19:13 -0500
commit7842536ddba1c816d6487c19b4c35b675996e54f (patch)
treeda848c70a7f68f488414df15b577e8ce49693d2b /src
parentMerge pull request #1927 from ReinUsesLisp/shader-ir (diff)
downloadyuzu-7842536ddba1c816d6487c19b4c35b675996e54f.tar.gz
yuzu-7842536ddba1c816d6487c19b4c35b675996e54f.tar.xz
yuzu-7842536ddba1c816d6487c19b4c35b675996e54f.zip
kernel/svc: Log out uncaught C++ exceptions from svcBreak
Looking into the implementation of the C++ standard facilities that seem to be within all modules, it appears that they use 7 as a break reason to indicate an uncaught C++ exception. This was primarily found via the third last function called within Horizon's equivalent of libcxxabi's demangling_terminate_handler(), which passes the value 0x80000007 to svcBreak.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/svc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 6588bd3b8..7cfecb68c 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -597,6 +597,7 @@ enum class BreakType : u32 {
597 PostNROLoad = 4, 597 PostNROLoad = 4,
598 PreNROUnload = 5, 598 PreNROUnload = 5,
599 PostNROUnload = 6, 599 PostNROUnload = 6,
600 CppException = 7,
600}; 601};
601 602
602struct BreakReason { 603struct BreakReason {
@@ -669,6 +670,9 @@ static void Break(u32 reason, u64 info1, u64 info2) {
669 "Signalling debugger, Unloaded an NRO at 0x{:016X} with size 0x{:016X}", info1, 670 "Signalling debugger, Unloaded an NRO at 0x{:016X} with size 0x{:016X}", info1,
670 info2); 671 info2);
671 break; 672 break;
673 case BreakType::CppException:
674 LOG_CRITICAL(Debug_Emulated, "Signalling debugger. Uncaught C++ exception encountered.");
675 break;
672 default: 676 default:
673 LOG_WARNING( 677 LOG_WARNING(
674 Debug_Emulated, 678 Debug_Emulated,