aboutsummaryrefslogtreecommitdiff
path: root/src/core/arm/arm_interface.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-06-20 20:39:16 -0400
committerLiam <byteslice@airmail.cc>2022-06-21 20:01:43 -0400
commit0d04631c1fb0829bd86374f2959df45c60c5528a (patch)
tree0f2c564bee9afd0660cc6471cd3d8d41908397a8 /src/core/arm/arm_interface.cpp
parentf4201ec44e9063dadaf01e206ac0f1fc76b485fb (diff)
dynarmic: Stop ReadCode callbacks to unmapped addresses
Diffstat (limited to 'src/core/arm/arm_interface.cpp')
-rw-r--r--src/core/arm/arm_interface.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp
index 6425e131f8..56d7d7b3c6 100644
--- a/src/core/arm/arm_interface.cpp
+++ b/src/core/arm/arm_interface.cpp
@@ -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;
}