summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMai <mathew1800@gmail.com>2022-06-15 17:55:54 +0200
committerGitHub <noreply@github.com>2022-06-15 17:55:54 +0200
commit23514388edaf210ab40440ce7a5f3363ea2d7fa1 (patch)
treeb5de11b6c7e941bacd1c0c5585c9166896f0447c
parentMerge pull request #8465 from Morph1984/why-msvc (diff)
parentkernel: notify debugger on break SVC (diff)
downloadyuzu-23514388edaf210ab40440ce7a5f3363ea2d7fa1.tar
yuzu-23514388edaf210ab40440ce7a5f3363ea2d7fa1.tar.gz
yuzu-23514388edaf210ab40440ce7a5f3363ea2d7fa1.tar.bz2
yuzu-23514388edaf210ab40440ce7a5f3363ea2d7fa1.tar.lz
yuzu-23514388edaf210ab40440ce7a5f3363ea2d7fa1.tar.xz
yuzu-23514388edaf210ab40440ce7a5f3363ea2d7fa1.tar.zst
yuzu-23514388edaf210ab40440ce7a5f3363ea2d7fa1.zip
-rw-r--r--src/core/hle/kernel/svc.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 9956f2b51..4f0a44363 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -15,6 +15,7 @@
#include "common/scope_exit.h"
#include "core/core.h"
#include "core/core_timing.h"
+#include "core/debugger/debugger.h"
#include "core/hle/kernel/k_client_port.h"
#include "core/hle/kernel/k_client_session.h"
#include "core/hle/kernel/k_code_memory.h"
@@ -627,6 +628,12 @@ static void Break(Core::System& system, u32 reason, u64 info1, u64 info2) {
const auto thread_processor_id = current_thread->GetActiveCore();
system.ArmInterface(static_cast<std::size_t>(thread_processor_id)).LogBacktrace();
}
+
+ if (system.DebuggerEnabled()) {
+ auto* thread = system.Kernel().GetCurrentEmuThread();
+ system.GetDebugger().NotifyThreadStopped(thread);
+ thread->RequestSuspend(Kernel::SuspendType::Debug);
+ }
}
static void Break32(Core::System& system, u32 reason, u32 info1, u32 info2) {