summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
diff options
context:
space:
mode:
authorTryTwo <taolas@gmail.com>2022-09-02 02:57:30 -0700
committerTryTwo <taolas@gmail.com>2022-12-04 11:25:33 -0700
commita17fbe7c6566682ef88119875b9ce0f719ebf257 (patch)
tree5c9c9945e06c3667cbd892d52e77448b1a0fa3a0 /Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
parent6abcaadd5a46dba26973cc7bcad040b9e343c43d (diff)
Expand conditional breakpoints to memory breakpoints
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp21
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();