Merge pull request #8490 from liamwhite/read-code-stop

dynarmic: Stop ReadCode callbacks to unmapped addresses
This commit is contained in:
Morph 2022-06-30 20:57:39 -07:00 committed by GitHub
commit 78ce053b4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 65 additions and 25 deletions

View file

@ -119,16 +119,23 @@ void ARM_Interface::Run() {
}
system.ExitDynarmicProfile();
// Notify the debugger and go to sleep if a breakpoint was hit.
if (Has(hr, breakpoint)) {
// Notify the debugger and go to sleep if a breakpoint was hit,
// or if the thread is unable to continue for any reason.
if (Has(hr, breakpoint) || Has(hr, no_execute)) {
RewindBreakpointInstruction();
system.GetDebugger().NotifyThreadStopped(current_thread);
current_thread->RequestSuspend(SuspendType::Debug);
if (system.DebuggerEnabled()) {
system.GetDebugger().NotifyThreadStopped(current_thread);
}
current_thread->RequestSuspend(Kernel::SuspendType::Debug);
break;
}
// Notify the debugger and go to sleep if a watchpoint was hit.
if (Has(hr, watchpoint)) {
RewindBreakpointInstruction();
system.GetDebugger().NotifyThreadWatchpoint(current_thread, *HaltedWatchpoint());
if (system.DebuggerEnabled()) {
system.GetDebugger().NotifyThreadWatchpoint(current_thread, *HaltedWatchpoint());
}
current_thread->RequestSuspend(SuspendType::Debug);
break;
}