summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-07-23 20:36:34 +0200
committerGitHub <noreply@github.com>2024-07-23 20:36:34 +0200
commit2d8f54fdd257840cac63999e99856482d528b11a (patch)
treee86e283ab71947cc8f5f64fb8a3ccb24f45a49d8 /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
parent7db5caf43e85362aacb47fd4c5383ddaed31b052 (diff)
parent5b13903e6a7e6ffcc707005692c3418d14e98137 (diff)
Merge pull request #12862 from SuperSamus/debugger-fixes
Debugger: Various fixes
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
index 51f2814d9b..6e7e12dcd2 100644
--- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
@@ -382,10 +382,11 @@ void CodeViewWidget::Update(const Core::CPUThreadGuard* guard)
if (ins == "blr")
ins_item->setForeground(dark_theme ? QColor(0xa0FFa0) : Qt::darkGreen);
- if (debug_interface.IsBreakpoint(addr))
+ const TBreakPoint* bp = power_pc.GetBreakPoints().GetRegularBreakpoint(addr);
+ if (bp != nullptr)
{
auto icon = Resources::GetThemeIcon("debugger_breakpoint").pixmap(QSize(rowh - 2, rowh - 2));
- if (!power_pc.GetBreakPoints().IsBreakPointEnable(addr))
+ if (!bp->is_enabled)
{
QPixmap disabled_icon(icon.size());
disabled_icon.fill(Qt::transparent);
@@ -594,7 +595,7 @@ void CodeViewWidget::OnContextMenu()
menu->addAction(tr("Set symbol &end address"), this, &CodeViewWidget::OnSetSymbolEndAddress);
menu->addSeparator();
- menu->addAction(tr("Run &To Here"), this, &CodeViewWidget::OnRunToHere);
+ auto* run_to_action = menu->addAction(tr("Run &To Here"), this, &CodeViewWidget::OnRunToHere);
auto* function_action =
menu->addAction(tr("&Add function"), this, &CodeViewWidget::OnAddFunction);
auto* ppc_action = menu->addAction(tr("PPC vs Host"), this, &CodeViewWidget::OnPPCComparison);
@@ -645,8 +646,8 @@ void CodeViewWidget::OnContextMenu()
follow_branch_action->setEnabled(follow_branch_enabled);
for (auto* action :
- {copy_address_action, copy_line_action, copy_hex_action, function_action, ppc_action,
- insert_blr_action, insert_nop_action, replace_action, assemble_action})
+ {copy_address_action, copy_line_action, copy_hex_action, function_action, run_to_action,
+ ppc_action, insert_blr_action, insert_nop_action, replace_action, assemble_action})
{
action->setEnabled(running);
}
@@ -869,9 +870,7 @@ void CodeViewWidget::OnRunToHere()
{
const u32 addr = GetContextAddress();
- m_system.GetPowerPC().GetDebugInterface().SetBreakpoint(addr);
- m_system.GetPowerPC().GetDebugInterface().RunToBreakpoint();
- Update();
+ m_system.GetPowerPC().GetDebugInterface().RunTo(addr);
}
void CodeViewWidget::OnPPCComparison()
@@ -1137,11 +1136,7 @@ void CodeViewWidget::showEvent(QShowEvent* event)
void CodeViewWidget::ToggleBreakpoint()
{
- auto& power_pc = m_system.GetPowerPC();
- if (power_pc.GetDebugInterface().IsBreakpoint(GetContextAddress()))
- power_pc.GetBreakPoints().Remove(GetContextAddress());
- else
- power_pc.GetBreakPoints().Add(GetContextAddress());
+ m_system.GetPowerPC().GetBreakPoints().ToggleBreakPoint(GetContextAddress());
emit BreakpointsChanged();
Update();