Skip to content

Commit 602bda9

Browse files
committed
small fixes from review
1 parent 94e3921 commit 602bda9

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/core/debug.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class Debug {
101101

102102
const BreakpointType m_type;
103103
BreakpointCondition m_condition = BreakpointCondition::Always;
104-
uint32_t m_conditionData;
104+
uint32_t m_conditionData = 0;
105105
const std::string m_source;
106106
const BreakpointInvoker m_invoker;
107107
mutable std::string m_label;
@@ -165,7 +165,10 @@ class Debug {
165165
if (m_lastBP == bp) m_lastBP = nullptr;
166166
delete const_cast<Breakpoint*>(bp);
167167
}
168-
void removeAllBreakpoints() { m_breakpoints.clear(); }
168+
void removeAllBreakpoints() {
169+
m_breakpoints.clear();
170+
m_lastBP = nullptr;
171+
}
169172

170173
private:
171174
bool triggerBP(Breakpoint* bp, uint32_t address, unsigned width, const char* reason = "");

src/gui/widgets/breakpoints.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void PCSX::Widgets::Breakpoints::draw(const char* title) {
124124
ImGui::TextColored(((bp->address() | bp->base()) == pc) ? s_hitColor : s_normalColor, "%d", row);
125125

126126
ImGui::TableNextColumn();
127-
std::string buttonStr = fmt::format("{:08x}", bp->address() | bp->base());
127+
std::string buttonStr = fmt::format("{:08x}##{:d}", bp->address() | bp->base(), row);
128128
if (ImGui::Button(buttonStr.c_str(), ImVec2(-FLT_MIN, 0.0f))) {
129129
if (bp->type() == Debug::BreakpointType::Exec) {
130130
g_system->m_eventBus->signal(PCSX::Events::GUI::JumpToPC{bp->address() | bp->base()});
@@ -217,7 +217,7 @@ void PCSX::Widgets::Breakpoints::draw(const char* title) {
217217
static int breakConditionImguiValue = 0;
218218
static int conditionVal = 0;
219219

220-
Debug::BreakpointCondition breakCondition;
220+
Debug::BreakpointCondition breakCondition = Debug::BreakpointCondition::Always;
221221
Debug::BreakpointType type = (Debug::BreakpointType)m_breakpointType;
222222
if (type != Debug::BreakpointType::Exec) {
223223
ImGui::Combo(_("Break Condition"), &breakConditionImguiValue, _("Always\0Change\0Greater\0Less\0Equal\0"));

0 commit comments

Comments
 (0)