summaryrefslogtreecommitdiff
path: root/src/core/arm/arm_interface.cpp
diff options
context:
space:
mode:
authorGravatar Liam2022-06-20 20:39:16 -0400
committerGravatar Liam2022-06-21 20:01:43 -0400
commit1fd194141a5643e3d274108a4a886ba8173270bd (patch)
tree0f2c564bee9afd0660cc6471cd3d8d41908397a8 /src/core/arm/arm_interface.cpp
parentMerge pull request #8432 from liamwhite/watchpoint (diff)
downloadyuzu-1fd194141a5643e3d274108a4a886ba8173270bd.tar.gz
yuzu-1fd194141a5643e3d274108a4a886ba8173270bd.tar.xz
yuzu-1fd194141a5643e3d274108a4a886ba8173270bd.zip
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 6425e131f..56d7d7b3c 100644
--- a/src/core/arm/arm_interface.cpp
+++ b/src/core/arm/arm_interface.cpp
@@ -119,16 +119,23 @@ void ARM_Interface::Run() {
119 } 119 }
120 system.ExitDynarmicProfile(); 120 system.ExitDynarmicProfile();
121 121
122 // Notify the debugger and go to sleep if a breakpoint was hit. 122 // Notify the debugger and go to sleep if a breakpoint was hit,
123 if (Has(hr, breakpoint)) { 123 // or if the thread is unable to continue for any reason.
124 if (Has(hr, breakpoint) || Has(hr, no_execute)) {
124 RewindBreakpointInstruction(); 125 RewindBreakpointInstruction();
125 system.GetDebugger().NotifyThreadStopped(current_thread); 126 if (system.DebuggerEnabled()) {
126 current_thread->RequestSuspend(SuspendType::Debug); 127 system.GetDebugger().NotifyThreadStopped(current_thread);
128 }
129 current_thread->RequestSuspend(Kernel::SuspendType::Debug);
127 break; 130 break;
128 } 131 }
132
133 // Notify the debugger and go to sleep if a watchpoint was hit.
129 if (Has(hr, watchpoint)) { 134 if (Has(hr, watchpoint)) {
130 RewindBreakpointInstruction(); 135 RewindBreakpointInstruction();
131 system.GetDebugger().NotifyThreadWatchpoint(current_thread, *HaltedWatchpoint()); 136 if (system.DebuggerEnabled()) {
137 system.GetDebugger().NotifyThreadWatchpoint(current_thread, *HaltedWatchpoint());
138 }
132 current_thread->RequestSuspend(SuspendType::Debug); 139 current_thread->RequestSuspend(SuspendType::Debug);
133 break; 140 break;
134 } 141 }