diff options
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp index fcc989f80a..019494491b 100644 --- a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp @@ -255,6 +255,13 @@ void BreakpointWidget::Update() m_table->setItem(i, 4, create_item(flags)); + QString condition; + + if (mbp.condition) + condition = QString::fromStdString(mbp.condition->GetText()); + + m_table->setItem(i, 5, create_item(condition)); + i++; } } @@ -430,7 +437,7 @@ void BreakpointWidget::AddBP(u32 addr, bool temp, bool break_on_hit, bool log_on } void BreakpointWidget::AddAddressMBP(u32 addr, bool on_read, bool on_write, bool do_log, - bool do_break) + bool do_break, const QString& condition) { TMemCheck check; @@ -441,10 +448,11 @@ void BreakpointWidget::AddAddressMBP(u32 addr, bool on_read, bool on_write, bool check.is_break_on_write = on_write; check.log_on_hit = do_log; check.break_on_hit = do_break; - + check.condition = + !condition.isEmpty() ? Expression::TryParse(condition.toUtf8().constData()) : std::nullopt; { const QSignalBlocker blocker(Settings::Instance()); - PowerPC::memchecks.Add(check); + PowerPC::memchecks.Add(std::move(check)); } emit BreakpointsChanged(); @@ -452,7 +460,7 @@ void BreakpointWidget::AddAddressMBP(u32 addr, bool on_read, bool on_write, bool } void BreakpointWidget::AddRangedMBP(u32 from, u32 to, bool on_read, bool on_write, bool do_log, - bool do_break) + bool do_break, const QString& condition) { TMemCheck check; @@ -463,10 +471,11 @@ void BreakpointWidget::AddRangedMBP(u32 from, u32 to, bool on_read, bool on_writ check.is_break_on_write = on_write; check.log_on_hit = do_log; check.break_on_hit = do_break; - + check.condition = + !condition.isEmpty() ? Expression::TryParse(condition.toUtf8().constData()) : std::nullopt; { const QSignalBlocker blocker(Settings::Instance()); - PowerPC::memchecks.Add(check); + PowerPC::memchecks.Add(std::move(check)); } emit BreakpointsChanged(); |
