Merge pull request #1459 from ogniK5377/break
svcBreak, Signalling to the debugger should not kill execution
This commit is contained in:
commit
fe16905de1
@ -301,13 +301,28 @@ static ResultCode ArbitrateUnlock(VAddr mutex_addr) {
|
|||||||
return Mutex::Release(mutex_addr);
|
return Mutex::Release(mutex_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct BreakReason {
|
||||||
|
union {
|
||||||
|
u64 raw;
|
||||||
|
BitField<31, 1, u64> dont_kill_application;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
/// Break program execution
|
/// Break program execution
|
||||||
static void Break(u64 reason, u64 info1, u64 info2) {
|
static void Break(u64 reason, u64 info1, u64 info2) {
|
||||||
LOG_CRITICAL(
|
BreakReason break_reason{reason};
|
||||||
Debug_Emulated,
|
if (break_reason.dont_kill_application) {
|
||||||
"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
|
LOG_ERROR(
|
||||||
reason, info1, info2);
|
Debug_Emulated,
|
||||||
ASSERT(false);
|
"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
|
/// Used to output a message on a debug hardware unit - does nothing on a retail unit
|
||||||
|
Loading…
Reference in New Issue
Block a user