From c457dbbd2f3926062ece73b31ea08f071ab9e8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 16 Aug 2026 16:38:34 +0200 Subject: [PATCH] Debugger breakpoints: Rename "Result" to "Action" --- Core/Debugger/Breakpoints.cpp | 78 ++++++++++--------- Core/Debugger/Breakpoints.h | 24 +++--- .../WebSocket/BreakpointSubscriber.cpp | 22 +++--- UI/ImDebugger/ImDebugger.cpp | 16 ++-- Windows/Debugger/BreakpointWindow.cpp | 10 +-- Windows/Debugger/Debugger_Lists.cpp | 8 +- 6 files changed, 84 insertions(+), 74 deletions(-) diff --git a/Core/Debugger/Breakpoints.cpp b/Core/Debugger/Breakpoints.cpp index 6d2539458f..ea3bac76a0 100644 --- a/Core/Debugger/Breakpoints.cpp +++ b/Core/Debugger/Breakpoints.cpp @@ -32,7 +32,7 @@ BreakpointManager g_breakpoints; void MemCheck::Log(u32 addr, bool write, int size, u32 pc, const char *reason) const { - if (result & BREAK_ACTION_LOG) { + if (action & BREAK_ACTION_LOG) { const char *type = write ? "Write" : "Read"; if (logFormat.empty()) { NOTICE_LOG(Log::MemMap, "CHK %s%i(%s) at %08x (%s), PC=%08x (%s)", type, size * 8, reason, addr, g_symbolMap->GetDescription(addr).c_str(), pc, g_symbolMap->GetDescription(pc).c_str()); @@ -45,27 +45,27 @@ void MemCheck::Log(u32 addr, bool write, int size, u32 pc, const char *reason) c } BreakAction MemCheck::Apply(u32 addr, bool write, int size, u32 pc) { - int mask = write ? MEMCHECK_WRITE : MEMCHECK_READ; - if (cond & mask) { + int condMask = write ? MEMCHECK_WRITE : MEMCHECK_READ; + if (cond & condMask) { if (hasCondition) { if (!condition.Evaluate()) - return BREAK_ACTION_IGNORE; + return BREAK_ACTION_NONE; } ++numHits; - return result; + return action; } - return BREAK_ACTION_IGNORE; + return BREAK_ACTION_NONE; } BreakAction MemCheck::Action(u32 addr, bool write, int size, u32 pc, const char *reason) { // Conditions have always already been checked if we get here. Log(addr, write, size, pc, reason); - if (result & BREAK_ACTION_PAUSE) { + if (action & BREAK_ACTION_PAUSE) { Core_Break(BreakReason::MemoryBreakpoint, start); } - return result; + return action; } size_t BreakpointManager::FindBreakpoint(u32 addr, bool matchTemp, bool temp) { @@ -108,7 +108,7 @@ bool BreakpointManager::IsAddressBreakPoint(u32 addr) if (!anyBreakPoints_) return false; size_t bp = FindBreakpoint(addr); - return bp != INVALID_BREAKPOINT && breakPoints_[bp].result != BREAK_ACTION_IGNORE; + return bp != INVALID_BREAKPOINT && breakPoints_[bp].action != BREAK_ACTION_NONE; } bool BreakpointManager::IsAddressBreakPoint(u32 addr, bool* enabled) @@ -117,8 +117,9 @@ bool BreakpointManager::IsAddressBreakPoint(u32 addr, bool* enabled) return false; size_t bp = FindBreakpoint(addr); if (bp == INVALID_BREAKPOINT) return false; - if (enabled != nullptr) + if (enabled != nullptr) { *enabled = breakPoints_[bp].IsEnabled(); + } return true; } @@ -146,7 +147,7 @@ int BreakpointManager::AddBreakPoint(u32 addr, bool temp) { size_t bp = FindBreakpoint(addr, true, temp); if (bp == INVALID_BREAKPOINT) { BreakPoint pt; - pt.result |= BREAK_ACTION_PAUSE; + pt.action |= BREAK_ACTION_PAUSE; pt.temporary = temp; pt.addr = addr; @@ -155,7 +156,7 @@ int BreakpointManager::AddBreakPoint(u32 addr, bool temp) { Update(addr); return (int)breakPoints_.size() - 1; } else if (!breakPoints_[bp].IsEnabled()) { - breakPoints_[bp].result |= BREAK_ACTION_PAUSE; + breakPoints_[bp].action |= BREAK_ACTION_PAUSE; breakPoints_[bp].hasCond = false; Update(addr); return (int)bp; @@ -184,17 +185,17 @@ void BreakpointManager::ChangeBreakPoint(u32 addr, bool status) { size_t bp = FindBreakpoint(addr); if (bp != INVALID_BREAKPOINT) { if (status) - breakPoints_[bp].result |= BREAK_ACTION_PAUSE; + breakPoints_[bp].action |= BREAK_ACTION_PAUSE; else - breakPoints_[bp].result = BreakAction(breakPoints_[bp].result & ~BREAK_ACTION_PAUSE); + breakPoints_[bp].action = BreakAction(breakPoints_[bp].action & ~BREAK_ACTION_PAUSE); Update(addr); } } -void BreakpointManager::ChangeBreakPoint(u32 addr, BreakAction result) { +void BreakpointManager::ChangeBreakPoint(u32 addr, BreakAction action) { size_t bp = FindBreakpoint(addr); if (bp != INVALID_BREAKPOINT) { - breakPoints_[bp].result = result; + breakPoints_[bp].action = action; Update(addr); } } @@ -278,7 +279,7 @@ void BreakpointManager::ChangeBreakPointLogFormat(u32 addr, const std::string &f BreakAction BreakpointManager::ExecBreakPoint(u32 addr) { if (!anyBreakPoints_) - return BREAK_ACTION_IGNORE; + return BREAK_ACTION_NONE; size_t bp = FindBreakpoint(addr, false); if (bp != INVALID_BREAKPOINT) { BreakPoint &info = breakPoints_[bp]; @@ -287,12 +288,12 @@ BreakAction BreakpointManager::ExecBreakPoint(u32 addr) { // Evaluate the breakpoint and abort if necessary. auto cond = BreakpointManager::GetBreakPointCondition(currentMIPS->pc); if (cond && !cond->Evaluate()) - return BREAK_ACTION_IGNORE; + return BREAK_ACTION_NONE; } ++info.numHits; - if (info.result & BREAK_ACTION_LOG) { + if (info.action & BREAK_ACTION_LOG) { if (info.logFormat.empty()) { NOTICE_LOG(Log::JIT, "BKP PC=%08x (%s)", addr, g_symbolMap->GetDescription(addr).c_str()); } else { @@ -301,24 +302,24 @@ BreakAction BreakpointManager::ExecBreakPoint(u32 addr) { NOTICE_LOG(Log::JIT, "BKP PC=%08x: %s", addr, formatted.c_str()); } } - if (info.result & BREAK_ACTION_PAUSE) { + if (info.action & BREAK_ACTION_PAUSE) { Core_Break(BreakReason::CpuBreakpoint, info.addr); } - return info.result; + return info.action; } - return BREAK_ACTION_IGNORE; + return BREAK_ACTION_NONE; } -int BreakpointManager::AddMemCheck(u32 start, u32 end, MemCheckCondition cond, BreakAction result) { +int BreakpointManager::AddMemCheck(u32 start, u32 end, MemCheckCondition cond, BreakAction action) { size_t mc = FindMemCheck(start, end); if (mc == INVALID_MEMCHECK) { MemCheck check; check.start = start; check.end = end; check.cond = cond; - check.result = result; + check.action = action; memChecks_.push_back(check); bool hadAny = anyMemChecks_.exchange(true); @@ -328,8 +329,9 @@ int BreakpointManager::AddMemCheck(u32 start, u32 end, MemCheckCondition cond, B Update(0); // Memchecks are not per-address, so just update everything. return (int)memChecks_.size() - 1; } else { + // Update with additional cond and action bits. Not sure if we should OR or override? memChecks_[mc].cond = (MemCheckCondition)(memChecks_[mc].cond | cond); - memChecks_[mc].result = (BreakAction)(memChecks_[mc].result | result); + memChecks_[mc].action = memChecks_[mc].action | action; bool hadAny = anyMemChecks_.exchange(true); if (!hadAny) { MemBlockOverrideDetailed(); @@ -352,13 +354,13 @@ void BreakpointManager::RemoveMemCheck(u32 start, u32 end) } } -void BreakpointManager::ChangeMemCheck(u32 start, u32 end, MemCheckCondition cond, BreakAction result) +void BreakpointManager::ChangeMemCheck(u32 start, u32 end, MemCheckCondition cond, BreakAction action) { size_t mc = FindMemCheck(start, end); if (mc != INVALID_MEMCHECK) { memChecks_[mc].cond = cond; - memChecks_[mc].result = result; + memChecks_[mc].action = action; Update(0); } } @@ -461,17 +463,17 @@ MemCheck *BreakpointManager::FindMemCheckInRange(u32 address, int size) { BreakAction BreakpointManager::ExecMemCheck(u32 address, bool write, int size, u32 pc, const char *reason) { if (!anyMemChecks_) - return BREAK_ACTION_IGNORE; + return BREAK_ACTION_NONE; MemCheck *check = FindMemCheckInRange(address, size); if (check) { BreakAction applyAction = check->Apply(address, write, size, pc); - if (applyAction == BREAK_ACTION_IGNORE) + if (applyAction == BREAK_ACTION_NONE) return applyAction; MemCheck copy = *check; return copy.Action(address, write, size, pc, reason); } - return BREAK_ACTION_IGNORE; + return BREAK_ACTION_NONE; } BreakAction BreakpointManager::ExecOpMemCheck(u32 address, u32 pc) { @@ -498,20 +500,20 @@ BreakAction BreakpointManager::ExecOpMemCheck(u32 address, u32 pc) { } if (apply) { BreakAction applyAction = check->Apply(address, write, size, pc); - if (applyAction == BREAK_ACTION_IGNORE) + if (applyAction == BREAK_ACTION_NONE) return applyAction; MemCheck copy = *check; return copy.Action(address, write, size, pc, "CPU"); } } - return BREAK_ACTION_IGNORE; + return BREAK_ACTION_NONE; } void BreakpointManager::RecomputeRegBreakpointMask() { u32 mask = 0; for (const auto &bp : regBreakpoints_) { - if (bp.result != BREAK_ACTION_IGNORE) + if (bp.result != BREAK_ACTION_NONE) mask |= 1u << bp.reg; } regBreakpointMask_ = mask; @@ -633,17 +635,17 @@ BreakAction BreakpointManager::ExecRegBreakpoint(int reg, u32 pc) { // a function call entirely in the overwhelmingly common no-breakpoint case), but check again // here too since this is also reachable directly. if ((regBreakpointMask_ & (1u << reg)) == 0) - return BREAK_ACTION_IGNORE; + return BREAK_ACTION_NONE; size_t bp = FindRegBreakpoint(reg); if (bp == INVALID_REG_BREAKPOINT) - return BREAK_ACTION_IGNORE; + return BREAK_ACTION_NONE; RegBreakpoint &info = regBreakpoints_[bp]; - if (info.result == BREAK_ACTION_IGNORE) - return BREAK_ACTION_IGNORE; + if (info.result == BREAK_ACTION_NONE) + return BREAK_ACTION_NONE; if (info.hasCond && !info.cond.Evaluate()) - return BREAK_ACTION_IGNORE; + return BREAK_ACTION_NONE; ++info.numHits; diff --git a/Core/Debugger/Breakpoints.h b/Core/Debugger/Breakpoints.h index e145b91afe..05f3db9ab5 100644 --- a/Core/Debugger/Breakpoints.h +++ b/Core/Debugger/Breakpoints.h @@ -24,9 +24,9 @@ #include "Common/Math/expression_parser.h" enum BreakAction : u32 { - BREAK_ACTION_IGNORE = 0x00, - BREAK_ACTION_LOG = 0x01, - BREAK_ACTION_PAUSE = 0x02, + BREAK_ACTION_NONE = 0, + BREAK_ACTION_LOG = (1 << 0), + BREAK_ACTION_PAUSE = (1 << 1), }; static inline BreakAction &operator |= (BreakAction &lhs, const BreakAction &rhs) { @@ -55,7 +55,7 @@ struct BreakPoint { u32 addr; bool temporary; - BreakAction result = BREAK_ACTION_IGNORE; + BreakAction action = BREAK_ACTION_NONE; std::string logFormat; bool hasCond = false; @@ -67,7 +67,7 @@ struct BreakPoint { u32 numHits = 0; bool IsEnabled() const { - return (result & BREAK_ACTION_PAUSE) != 0; + return (action & BREAK_ACTION_PAUSE) != 0; } bool operator == (const BreakPoint &other) const { @@ -91,7 +91,7 @@ struct MemCheck { u32 end; MemCheckCondition cond = MEMCHECK_READ; - BreakAction result = BREAK_ACTION_IGNORE; + BreakAction action = BREAK_ACTION_NONE; std::string logFormat; bool hasCondition = false; @@ -111,7 +111,7 @@ struct MemCheck { void Log(u32 addr, bool write, int size, u32 pc, const char *reason) const; bool IsEnabled() const { - return (result & BREAK_ACTION_PAUSE) != 0; + return (action & BREAK_ACTION_PAUSE) != 0; } bool operator == (const MemCheck &other) const { @@ -128,7 +128,7 @@ struct MemCheck { struct RegBreakpoint { int reg = 0; // 0-31, general-purpose register index (matches OUT_RT/OUT_RD/OUT_RA fields). - BreakAction result = BREAK_ACTION_IGNORE; + BreakAction result = BREAK_ACTION_NONE; std::string logFormat; bool hasCond = false; @@ -162,7 +162,7 @@ public: int AddBreakPoint(u32 addr, bool temp = false); // Returns the breakpoint index. void RemoveBreakPoint(u32 addr); void ChangeBreakPoint(u32 addr, bool enable); - void ChangeBreakPoint(u32 addr, BreakAction result); + void ChangeBreakPoint(u32 addr, BreakAction action); void ClearAllBreakPoints(); void ClearTemporaryBreakPoints(); @@ -175,9 +175,9 @@ public: BreakAction ExecBreakPoint(u32 addr); - int AddMemCheck(u32 start, u32 end, MemCheckCondition cond, BreakAction result); + int AddMemCheck(u32 start, u32 end, MemCheckCondition cond, BreakAction action); void RemoveMemCheck(u32 start, u32 end); - void ChangeMemCheck(u32 start, u32 end, MemCheckCondition cond, BreakAction result); + void ChangeMemCheck(u32 start, u32 end, MemCheckCondition cond, BreakAction action); void ClearAllMemChecks(); void ChangeMemCheckAddCond(u32 start, u32 end, const BreakPointCond &cond); @@ -195,7 +195,7 @@ public: int AddRegBreakpoint(int reg); // Returns the breakpoint index. void RemoveRegBreakpoint(int reg); void ChangeRegBreakpoint(int reg, bool enable); - void ChangeRegBreakpoint(int reg, BreakAction result); + void ChangeRegBreakpoint(int reg, BreakAction action); void ClearAllRegBreakpoints(); void ChangeRegBreakpointAddCond(int reg, const BreakPointCond &cond); diff --git a/Core/Debugger/WebSocket/BreakpointSubscriber.cpp b/Core/Debugger/WebSocket/BreakpointSubscriber.cpp index d1f047007e..38957c9487 100644 --- a/Core/Debugger/WebSocket/BreakpointSubscriber.cpp +++ b/Core/Debugger/WebSocket/BreakpointSubscriber.cpp @@ -143,7 +143,7 @@ struct WebSocketCPUBreakpointParams { hasEnabled = true; } if (hasLog && hasEnabled) { - BreakAction result = BREAK_ACTION_IGNORE; + BreakAction result = BREAK_ACTION_NONE; if (log) result |= BREAK_ACTION_LOG; if (enabled) @@ -268,7 +268,7 @@ void WebSocketCPUBreakpointList(DebuggerRequest &req) { json.pushDict(); json.writeUint("address", bp.addr); json.writeBool("enabled", bp.IsEnabled()); - json.writeBool("log", (bp.result & BREAK_ACTION_LOG) != 0); + json.writeBool("log", (bp.action & BREAK_ACTION_LOG) != 0); json.writeUint("hits", bp.numHits); if (bp.hasCond) json.writeString("condition", bp.cond.expressionString); @@ -297,6 +297,8 @@ void WebSocketCPUBreakpointList(DebuggerRequest &req) { struct WebSocketMemoryBreakpointParams { uint32_t address = 0; uint32_t end = 0; + + // These flags indicate whether the corresponding parameter was present in the request. bool hasEnabled = false; bool hasLog = false; bool hasCond = false; @@ -363,14 +365,14 @@ struct WebSocketMemoryBreakpointParams { return true; } - BreakAction Result(bool adding) { - int bits = MEMCHECK_READWRITE; + BreakAction Action(bool adding) { + int bits = BREAK_ACTION_PAUSE | BREAK_ACTION_LOG; if (adding || (hasLog && hasEnabled)) { bits = (enabled ? BREAK_ACTION_PAUSE : 0) | (log ? BREAK_ACTION_LOG : 0); } else { MemCheck prev; if (g_breakpoints.GetMemCheck(address, end, &prev)) - bits = prev.result; + bits = prev.action; if (hasEnabled) bits = (bits & ~BREAK_ACTION_PAUSE) | (enabled ? BREAK_ACTION_PAUSE : 0); @@ -422,7 +424,7 @@ void WebSocketMemoryBreakpointAdd(DebuggerRequest &req) { // Route the actual breakpoint manipulation to the CPU thread instead of poking at it directly // from this WebSocket handler thread - see Core_RunOnCPUThread() in Core.h. Core_RunOnCPUThread([&] { - g_breakpoints.AddMemCheck(params.address, params.end, params.cond, params.Result(true)); + g_breakpoints.AddMemCheck(params.address, params.end, params.cond, params.Action(true)); params.Apply(); }); req.Respond(); @@ -455,7 +457,7 @@ void WebSocketMemoryBreakpointUpdate(DebuggerRequest &req) { MemCheck mc; found = g_breakpoints.GetMemCheck(params.address, params.end, &mc); if (found) { - g_breakpoints.ChangeMemCheck(params.address, params.end, params.cond, params.Result(true)); + g_breakpoints.ChangeMemCheck(params.address, params.end, params.cond, params.Action(true)); params.Apply(); } }); @@ -528,8 +530,8 @@ void WebSocketMemoryBreakpointList(DebuggerRequest &req) { json.pushDict(); json.writeUint("address", mc.start); json.writeUint("size", mc.end == 0 ? 0 : mc.end - mc.start); - json.writeBool("enabled", mc.IsEnabled()); - json.writeBool("log", (mc.result & BREAK_ACTION_LOG) != 0); + json.writeBool("enabled", (mc.action & BREAK_ACTION_PAUSE)); + json.writeBool("log", (mc.action & BREAK_ACTION_LOG) != 0); json.writeBool("read", (mc.cond & MEMCHECK_READ) != 0); json.writeBool("write", (mc.cond & MEMCHECK_WRITE) != 0); json.writeBool("change", (mc.cond & MEMCHECK_WRITE_ONCHANGE) != 0); @@ -626,7 +628,7 @@ struct WebSocketRegBreakpointParams { hasEnabled = true; } if (hasLog && hasEnabled) { - BreakAction result = BREAK_ACTION_IGNORE; + BreakAction result = BREAK_ACTION_NONE; if (log) result |= BREAK_ACTION_LOG; if (enabled) diff --git a/UI/ImDebugger/ImDebugger.cpp b/UI/ImDebugger/ImDebugger.cpp index de4d0efe7b..4b5ed3d4a8 100644 --- a/UI/ImDebugger/ImDebugger.cpp +++ b/UI/ImDebugger/ImDebugger.cpp @@ -1023,7 +1023,8 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) { } if (ImGui::BeginTable("breakpoints", 8, ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersH)) { - ImGui::TableSetupColumn("Enabled", ImGuiTableColumnFlags_WidthFixed); + ImGui::TableSetupColumn("Enabled", ImGuiTableColumnFlags_WidthFixed); // Really means action is to pause + ImGui::TableSetupColumn("Log", ImGuiTableColumnFlags_WidthFixed); // Really means action is to pause ImGui::TableSetupColumn("Type", ImGuiTableColumnFlags_WidthFixed); ImGui::TableSetupColumn("Address", ImGuiTableColumnFlags_WidthFixed); ImGui::TableSetupColumn("Size/Label", ImGuiTableColumnFlags_WidthFixed); @@ -1049,7 +1050,9 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) { cfg.selectedMemCheck = -1; } ImGui::SameLine(); - ImGui::CheckboxFlags("##enabled", (int *)&bp.result, (int)BREAK_ACTION_PAUSE); + ImGui::CheckboxFlags("##enabled", (int *)&bp.action, (int)BREAK_ACTION_PAUSE); + ImGui::TableNextColumn(); + ImGui::CheckboxFlags("##log", (int *)&bp.action, (int)BREAK_ACTION_LOG); ImGui::TableNextColumn(); ImGui::TextUnformatted("Exec"); ImGui::TableNextColumn(); @@ -1086,7 +1089,9 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) { cfg.selectedMemCheck = i; } ImGui::SameLine(); - ImGui::CheckboxFlags("", (int *)&mc.result, BREAK_ACTION_PAUSE); + ImGui::CheckboxFlags("##enabled", (int *)&mc.action, (int)BREAK_ACTION_PAUSE); + ImGui::TableNextColumn(); + ImGui::CheckboxFlags("##log", (int *)&mc.action, (int)BREAK_ACTION_LOG); ImGui::TableNextColumn(); ImGui::TextUnformatted(MemCheckConditionToString(mc.cond)); ImGui::TableNextColumn(); @@ -1112,7 +1117,8 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) { if (ImGui::BeginChild("bp_edit")) { auto &bp = bps[cfg.selectedBreakpoint]; ImGui::TextUnformatted("Edit breakpoint"); - ImGui::CheckboxFlags("Enabled", (int *)&bp.result, (int)BREAK_ACTION_PAUSE); + ImGui::CheckboxFlags("Enabled", (int *)&bp.action, (int)BREAK_ACTION_PAUSE); + ImGui::CheckboxFlags("Log", (int *)&bp.action, (int)BREAK_ACTION_LOG); ImGui::InputScalar("Address", ImGuiDataType_U32, &bp.addr, nullptr, nullptr, "%08x", ImGuiInputTextFlags_CharsHexadecimal); if (ImGui::Button("Delete")) { g_breakpoints.RemoveBreakPoint(bp.addr); @@ -1141,7 +1147,7 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) { } ImGui::EndCombo(); } - ImGui::CheckboxFlags("Enabled", (int *)&mc.result, (int)BREAK_ACTION_PAUSE); + ImGui::CheckboxFlags("Enabled", (int *)&mc.action, (int)BREAK_ACTION_PAUSE); ImGui::InputScalar("Start", ImGuiDataType_U32, &mc.start, NULL, NULL, "%08x", ImGuiInputTextFlags_CharsHexadecimal); ImGui::InputScalar("End", ImGuiDataType_U32, &mc.end, NULL, NULL, "%08x", ImGuiInputTextFlags_CharsHexadecimal); if (ImGui::Button("Delete")) { diff --git a/Windows/Debugger/BreakpointWindow.cpp b/Windows/Debugger/BreakpointWindow.cpp index bd7b6b15b5..1c5bed22fa 100644 --- a/Windows/Debugger/BreakpointWindow.cpp +++ b/Windows/Debugger/BreakpointWindow.cpp @@ -204,7 +204,7 @@ bool BreakpointWindow::exec() { } void BreakpointWindow::addBreakpoint() { - BreakAction result = BREAK_ACTION_IGNORE; + BreakAction result = BREAK_ACTION_NONE; if (log) result |= BREAK_ACTION_LOG; if (enabled) @@ -256,8 +256,8 @@ void BreakpointWindow::loadFromMemcheck(const MemCheck &memcheck) { write = (memcheck.cond & MEMCHECK_WRITE) != 0; onChange = (memcheck.cond & MEMCHECK_WRITE_ONCHANGE) != 0; - log = (memcheck.result & BREAK_ACTION_LOG) != 0; - enabled = (memcheck.result & BREAK_ACTION_PAUSE) != 0; + log = (memcheck.action & BREAK_ACTION_LOG) != 0; + enabled = (memcheck.action & BREAK_ACTION_PAUSE) != 0; address = memcheck.start; size = memcheck.end - address; @@ -275,8 +275,8 @@ void BreakpointWindow::loadFromMemcheck(const MemCheck &memcheck) { void BreakpointWindow::loadFromBreakpoint(const BreakPoint& breakpoint) { memory = false; - log = (breakpoint.result & BREAK_ACTION_LOG) != 0; - enabled = (breakpoint.result & BREAK_ACTION_PAUSE) != 0; + log = (breakpoint.action & BREAK_ACTION_LOG) != 0; + enabled = (breakpoint.action & BREAK_ACTION_PAUSE) != 0; address = breakpoint.addr; size = 1; diff --git a/Windows/Debugger/Debugger_Lists.cpp b/Windows/Debugger/Debugger_Lists.cpp index 5c3ea40f6c..e8c16d3c43 100644 --- a/Windows/Debugger/Debugger_Lists.cpp +++ b/Windows/Debugger/Debugger_Lists.cpp @@ -399,10 +399,10 @@ void CtrlBreakpointList::toggleEnabled(int itemIndex) // GUI thread - see Core_RunOnCPUThread() in Core.h. if (isMemory) { MemCheck mcPrev = displayedMemChecks_[index]; - Core_RunOnCPUThread([&] { g_breakpoints.ChangeMemCheck(mcPrev.start, mcPrev.end, mcPrev.cond, BreakAction(mcPrev.result ^ BREAK_ACTION_PAUSE)); }); + Core_RunOnCPUThread([&] { g_breakpoints.ChangeMemCheck(mcPrev.start, mcPrev.end, mcPrev.cond, BreakAction(mcPrev.action ^ BREAK_ACTION_PAUSE)); }); } else { BreakPoint bpPrev = displayedBreakPoints_[index]; - Core_RunOnCPUThread([&] { g_breakpoints.ChangeBreakPoint(bpPrev.addr, BreakAction(bpPrev.result ^ BREAK_ACTION_PAUSE)); }); + Core_RunOnCPUThread([&] { g_breakpoints.ChangeBreakPoint(bpPrev.addr, BreakAction(bpPrev.action ^ BREAK_ACTION_PAUSE)); }); } } @@ -644,9 +644,9 @@ void CtrlBreakpointList::showBreakpointMenu(int itemIndex, const POINT &pt) // Route the breakpoint mutation to the CPU thread instead of poking at it directly // from this GUI thread - see Core_RunOnCPUThread() in Core.h. if (isMemory) { - Core_RunOnCPUThread([&] { g_breakpoints.ChangeMemCheck(mcPrev.start, mcPrev.end, mcPrev.cond, BreakAction(mcPrev.result ^ BREAK_ACTION_PAUSE)); }); + Core_RunOnCPUThread([&] { g_breakpoints.ChangeMemCheck(mcPrev.start, mcPrev.end, mcPrev.cond, BreakAction(mcPrev.action ^ BREAK_ACTION_PAUSE)); }); } else { - Core_RunOnCPUThread([&] { g_breakpoints.ChangeBreakPoint(bpPrev.addr, BreakAction(bpPrev.result ^ BREAK_ACTION_PAUSE)); }); + Core_RunOnCPUThread([&] { g_breakpoints.ChangeBreakPoint(bpPrev.addr, BreakAction(bpPrev.action ^ BREAK_ACTION_PAUSE)); }); } break; case ID_DISASM_EDITBREAKPOINT: