Logging improvement in Core_Break

This commit is contained in:
Henrik Rydgård
2025-06-02 00:02:21 +02:00
parent d5db1ab42a
commit 4d7dce4e19
+4 -3
View File
@@ -420,8 +420,9 @@ static bool Core_ProcessStepping(MIPSDebugInterface *cpu) {
// Free-threaded (hm, possibly except tracing).
void Core_Break(BreakReason reason, u32 relatedAddress) {
if (coreState != CORE_RUNNING_CPU) {
ERROR_LOG(Log::CPU, "Core_Break only works in the CORE_RUNNING_CPU state");
const CoreState state = coreState;
if (state != CORE_RUNNING_CPU) {
ERROR_LOG(Log::CPU, "Core_Break(%s) only works in the CORE_RUNNING_CPU state (was in state %s)", BreakReasonToString(reason), CoreStateToString(state));
return;
}
@@ -435,7 +436,7 @@ void Core_Break(BreakReason reason, u32 relatedAddress) {
// Allow overwriting the command.
break;
default:
ERROR_LOG(Log::CPU, "Core_Break called with a step-command already in progress: %s", BreakReasonToString(g_cpuStepCommand.reason));
ERROR_LOG(Log::CPU, "Core_Break(%s) called with a step-command already in progress", BreakReasonToString(g_cpuStepCommand.reason));
return;
}
}