summaryrefslogtreecommitdiffstats
path: root/src/core/arm/arm_interface.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-07-01 05:57:39 +0200
committerGitHub <noreply@github.com>2022-07-01 05:57:39 +0200
commit78ce053b4dab30c362cfc1f79762e42d62e84695 (patch)
tree398af753d8e47016fb6e08aaf490afe6ff00e087 /src/core/arm/arm_interface.cpp
parentMerge pull request #7454 from FernandoS27/new-core-timing (diff)
parentdynarmic: Stop ReadCode callbacks to unmapped addresses (diff)
downloadyuzu-78ce053b4dab30c362cfc1f79762e42d62e84695.tar
yuzu-78ce053b4dab30c362cfc1f79762e42d62e84695.tar.gz
yuzu-78ce053b4dab30c362cfc1f79762e42d62e84695.tar.bz2
yuzu-78ce053b4dab30c362cfc1f79762e42d62e84695.tar.lz
yuzu-78ce053b4dab30c362cfc1f79762e42d62e84695.tar.xz
yuzu-78ce053b4dab30c362cfc1f79762e42d62e84695.tar.zst
yuzu-78ce053b4dab30c362cfc1f79762e42d62e84695.zip
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 8e095cdcd..0efc3732f 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;
}