summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-10-24 01:56:42 +0200
committerGitHub <noreply@github.com>2018-10-24 01:56:42 +0200
commita94e5d9e68619a90c9171a5198162bc74fb88f22 (patch)
treea52d31fb2e8a9f4f153e82ba5bb578581112c763 /src/core/hle/kernel
parentAdded Amiibo support (#1390) (diff)
parentAdded assertion failed, reworked logging levels (diff)
downloadyuzu-a94e5d9e68619a90c9171a5198162bc74fb88f22.tar
yuzu-a94e5d9e68619a90c9171a5198162bc74fb88f22.tar.gz
yuzu-a94e5d9e68619a90c9171a5198162bc74fb88f22.tar.bz2
yuzu-a94e5d9e68619a90c9171a5198162bc74fb88f22.tar.lz
yuzu-a94e5d9e68619a90c9171a5198162bc74fb88f22.tar.xz
yuzu-a94e5d9e68619a90c9171a5198162bc74fb88f22.tar.zst
yuzu-a94e5d9e68619a90c9171a5198162bc74fb88f22.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/svc.cpp56
1 files changed, 51 insertions, 5 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 67ea67666..9a783d524 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -375,9 +375,19 @@ static ResultCode ArbitrateUnlock(VAddr mutex_addr) {
return Mutex::Release(mutex_addr);
}
+enum class BreakType : u32 {
+ Panic = 0,
+ AssertionFailed = 1,
+ PreNROLoad = 3,
+ PostNROLoad = 4,
+ PreNROUnload = 5,
+ PostNROUnload = 6,
+};
+
struct BreakReason {
union {
u32 raw;
+ BitField<0, 30, BreakType> break_type;
BitField<31, 1, u32> signal_debugger;
};
};
@@ -385,12 +395,48 @@ struct BreakReason {
/// Break program execution
static void Break(u32 reason, u64 info1, u64 info2) {
BreakReason break_reason{reason};
- if (break_reason.signal_debugger) {
- LOG_ERROR(
+
+ switch (break_reason.break_type) {
+ case BreakType::Panic:
+ LOG_CRITICAL(Debug_Emulated, "Signalling debugger, PANIC! info1=0x{:016X}, info2=0x{:016X}",
+ info1, info2);
+ break;
+ case BreakType::AssertionFailed:
+ LOG_CRITICAL(Debug_Emulated,
+ "Signalling debugger, Assertion failed! info1=0x{:016X}, info2=0x{:016X}",
+ info1, info2);
+ break;
+ case BreakType::PreNROLoad:
+ LOG_WARNING(
Debug_Emulated,
- "Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
- reason, info1, info2);
- } else {
+ "Signalling debugger, Attempting to load an NRO at 0x{:016X} with size 0x{:016X}",
+ info1, info2);
+ break;
+ case BreakType::PostNROLoad:
+ LOG_WARNING(Debug_Emulated,
+ "Signalling debugger, Loaded an NRO at 0x{:016X} with size 0x{:016X}", info1,
+ info2);
+ break;
+ case BreakType::PreNROUnload:
+ LOG_WARNING(
+ Debug_Emulated,
+ "Signalling debugger, Attempting to unload an NRO at 0x{:016X} with size 0x{:016X}",
+ info1, info2);
+ break;
+ case BreakType::PostNROUnload:
+ LOG_WARNING(Debug_Emulated,
+ "Signalling debugger, Unloaded an NRO at 0x{:016X} with size 0x{:016X}", info1,
+ info2);
+ break;
+ default:
+ LOG_WARNING(
+ Debug_Emulated,
+ "Signalling debugger, Unknown break reason {}, info1=0x{:016X}, info2=0x{:016X}",
+ static_cast<u32>(break_reason.break_type.Value()), info1, info2);
+ break;
+ }
+
+ if (!break_reason.signal_debugger) {
LOG_CRITICAL(
Debug_Emulated,
"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",