Skip to content
Snippets Groups Projects
Unverified Commit 7842536d authored by Lioncash's avatar Lioncash
Browse files

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.
parent 1f4ca1e8
No related branches found
No related tags found
No related merge requests found
...@@ -597,6 +597,7 @@ enum class BreakType : u32 { ...@@ -597,6 +597,7 @@ enum class BreakType : u32 {
PostNROLoad = 4, PostNROLoad = 4,
PreNROUnload = 5, PreNROUnload = 5,
PostNROUnload = 6, PostNROUnload = 6,
CppException = 7,
}; };
struct BreakReason { struct BreakReason {
...@@ -669,6 +670,9 @@ static void Break(u32 reason, u64 info1, u64 info2) { ...@@ -669,6 +670,9 @@ static void Break(u32 reason, u64 info1, u64 info2) {
"Signalling debugger, Unloaded an NRO at 0x{:016X} with size 0x{:016X}", info1, "Signalling debugger, Unloaded an NRO at 0x{:016X} with size 0x{:016X}", info1,
info2); info2);
break; break;
case BreakType::CppException:
LOG_CRITICAL(Debug_Emulated, "Signalling debugger. Uncaught C++ exception encountered.");
break;
default: default:
LOG_WARNING( LOG_WARNING(
Debug_Emulated, Debug_Emulated,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment