forked from ShuriZma/suyu
1
0
Fork 0

Merge pull request #1459 from ogniK5377/break

svcBreak, Signalling to the debugger should not kill execution
This commit is contained in:
bunnei 2018-10-09 16:57:37 -04:00 committed by GitHub
commit fe16905de1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 5 deletions

View File

@ -301,14 +301,29 @@ static ResultCode ArbitrateUnlock(VAddr mutex_addr) {
return Mutex::Release(mutex_addr);
}
struct BreakReason {
union {
u64 raw;
BitField<31, 1, u64> dont_kill_application;
};
};
/// Break program execution
static void Break(u64 reason, u64 info1, u64 info2) {
BreakReason break_reason{reason};
if (break_reason.dont_kill_application) {
LOG_ERROR(
Debug_Emulated,
"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
reason, info1, info2);
} else {
LOG_CRITICAL(
Debug_Emulated,
"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
reason, info1, info2);
ASSERT(false);
}
}
/// Used to output a message on a debug hardware unit - does nothing on a retail unit
static void OutputDebugString(VAddr address, u64 len) {