aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorGravatar bunnei <bunneidev@gmail.com>2015-05-18 08:04:22 -0400
committerGravatar bunnei <bunneidev@gmail.com>2015-05-18 08:04:22 -0400
commit1b47da41153c9955749ea23bea884d4f22f32b5a (patch)
tree32411f02f951bc8ca58f0028676a45de12c05d55 /src/core/hle/svc.cpp
parent2c721f376498823f1e8929693d84850d4368e411 (diff)
parent11057488f94ec8ec012ddd524d7c1acb530c9788 (diff)
Merge pull request #785 from archshift/break
Implement svcBreak
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 654ee2bf..22adf959 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -296,6 +296,18 @@ static ResultCode ArbitrateAddress(Handle handle, u32 address, u32 type, u32 val
return res;
}
+static void Break(u8 break_reason) {
+ LOG_CRITICAL(Debug_Emulated, "Emulated program broke execution!");
+ std::string reason_str;
+ switch (break_reason) {
+ case 0: reason_str = "PANIC"; break;
+ case 1: reason_str = "ASSERT"; break;
+ case 2: reason_str = "USER"; break;
+ default: reason_str = "UNKNOWN"; break;
+ }
+ LOG_CRITICAL(Debug_Emulated, "Break reason: %s", reason_str.c_str());
+}
+
/// Used to output a message on a debug hardware unit - does nothing on a retail unit
static void OutputDebugString(const char* string) {
LOG_DEBUG(Debug_Emulated, "%s", string);
@@ -737,7 +749,7 @@ static const FunctionDef SVC_Table[] = {
{0x39, HLE::Wrap<GetResourceLimitLimitValues>, "GetResourceLimitLimitValues"},
{0x3A, HLE::Wrap<GetResourceLimitCurrentValues>, "GetResourceLimitCurrentValues"},
{0x3B, nullptr, "GetThreadContext"},
- {0x3C, nullptr, "Break"},
+ {0x3C, HLE::Wrap<Break>, "Break"},
{0x3D, HLE::Wrap<OutputDebugString>, "OutputDebugString"},
{0x3E, nullptr, "ControlPerformanceCounter"},
{0x3F, nullptr, "Unknown"},