From 6adf8cabaef8f1becf9f2b9231f75cc79a0c0f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 6 Dec 2024 00:40:21 +0100 Subject: [PATCH] Fix regression in break-on-load functionality --- Core/Core.cpp | 2 +- Core/PSPLoaders.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Core/Core.cpp b/Core/Core.cpp index 1ab6180894..3b2753e0f7 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -323,7 +323,7 @@ void Core_ProcessStepping(MIPSDebugInterface *cpu) { // Free-threaded (hm, possibly except tracing). void Core_Break(const char *reason, u32 relatedAddress) { if (coreState != CORE_RUNNING_CPU) { - ERROR_LOG(Log::CPU, "Core_Break ony works in the CORE_RUNNING_CPU state"); + ERROR_LOG(Log::CPU, "Core_Break only works in the CORE_RUNNING_CPU state"); return; } diff --git a/Core/PSPLoaders.cpp b/Core/PSPLoaders.cpp index 9e57cb18c1..f4097e6c2e 100644 --- a/Core/PSPLoaders.cpp +++ b/Core/PSPLoaders.cpp @@ -326,7 +326,8 @@ bool Load_PSP_ISO(FileLoader *fileLoader, std::string *error_string) { bool success = __KernelLoadExec(bootpath.c_str(), 0, &PSP_CoreParameter().errorString); if (success && coreState == CORE_POWERUP) { if (PSP_CoreParameter().startBreak) { - Core_Break("start-break"); + coreState = CORE_STEPPING_CPU; + System_Notify(SystemNotification::DEBUG_MODE_CHANGE); } else { coreState = CORE_RUNNING_CPU; } @@ -487,7 +488,8 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) { bool success = __KernelLoadExec(finalName.c_str(), 0, &PSP_CoreParameter().errorString); if (success && coreState == CORE_POWERUP) { if (PSP_CoreParameter().startBreak) { - Core_Break("start-break"); + coreState = CORE_STEPPING_CPU; + System_Notify(SystemNotification::DEBUG_MODE_CHANGE); } else { coreState = CORE_RUNNING_CPU; } @@ -517,7 +519,8 @@ bool Load_PSP_GE_Dump(FileLoader *fileLoader, std::string *error_string) { bool success = __KernelLoadGEDump("disc0:/data.ppdmp", &PSP_CoreParameter().errorString); if (success && coreState == CORE_POWERUP) { if (PSP_CoreParameter().startBreak) { - Core_Break("start-break"); + coreState = CORE_STEPPING_CPU; + System_Notify(SystemNotification::DEBUG_MODE_CHANGE); } else { coreState = CORE_RUNNING_CPU; }