diff options
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 654ee2bf6..22adf9595 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 | |||
| 296 | return res; | 296 | return res; |
| 297 | } | 297 | } |
| 298 | 298 | ||
| 299 | static void Break(u8 break_reason) { | ||
| 300 | LOG_CRITICAL(Debug_Emulated, "Emulated program broke execution!"); | ||
| 301 | std::string reason_str; | ||
| 302 | switch (break_reason) { | ||
| 303 | case 0: reason_str = "PANIC"; break; | ||
| 304 | case 1: reason_str = "ASSERT"; break; | ||
| 305 | case 2: reason_str = "USER"; break; | ||
| 306 | default: reason_str = "UNKNOWN"; break; | ||
| 307 | } | ||
| 308 | LOG_CRITICAL(Debug_Emulated, "Break reason: %s", reason_str.c_str()); | ||
| 309 | } | ||
| 310 | |||
| 299 | /// Used to output a message on a debug hardware unit - does nothing on a retail unit | 311 | /// Used to output a message on a debug hardware unit - does nothing on a retail unit |
| 300 | static void OutputDebugString(const char* string) { | 312 | static void OutputDebugString(const char* string) { |
| 301 | LOG_DEBUG(Debug_Emulated, "%s", string); | 313 | LOG_DEBUG(Debug_Emulated, "%s", string); |
| @@ -737,7 +749,7 @@ static const FunctionDef SVC_Table[] = { | |||
| 737 | {0x39, HLE::Wrap<GetResourceLimitLimitValues>, "GetResourceLimitLimitValues"}, | 749 | {0x39, HLE::Wrap<GetResourceLimitLimitValues>, "GetResourceLimitLimitValues"}, |
| 738 | {0x3A, HLE::Wrap<GetResourceLimitCurrentValues>, "GetResourceLimitCurrentValues"}, | 750 | {0x3A, HLE::Wrap<GetResourceLimitCurrentValues>, "GetResourceLimitCurrentValues"}, |
| 739 | {0x3B, nullptr, "GetThreadContext"}, | 751 | {0x3B, nullptr, "GetThreadContext"}, |
| 740 | {0x3C, nullptr, "Break"}, | 752 | {0x3C, HLE::Wrap<Break>, "Break"}, |
| 741 | {0x3D, HLE::Wrap<OutputDebugString>, "OutputDebugString"}, | 753 | {0x3D, HLE::Wrap<OutputDebugString>, "OutputDebugString"}, |
| 742 | {0x3E, nullptr, "ControlPerformanceCounter"}, | 754 | {0x3E, nullptr, "ControlPerformanceCounter"}, |
| 743 | {0x3F, nullptr, "Unknown"}, | 755 | {0x3F, nullptr, "Unknown"}, |