diff options
| author | JoshuaMK <60854312+JoshuaMKW@users.noreply.github.com> | 2022-11-20 22:11:15 -0600 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-11-26 03:38:25 +0100 |
| commit | dd2282324b22fbb70455265d13ac17b7f6e2909c (patch) | |
| tree | d81bbb7b87bdb0943d78dd2f91f7db020318f5e7 /Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp | |
| parent | 032f54d403d9d122b748050d1f11c7fa7a83bbf4 (diff) | |
Debugger BreakpointWidget: Allow editing breakpoints
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp index 5a88814a24..fcc989f80a 100644 --- a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp @@ -19,8 +19,8 @@ #include "Core/PowerPC/PPCSymbolDB.h" #include "Core/PowerPC/PowerPC.h" +#include "DolphinQt/Debugger/BreakpointDialog.h" #include "DolphinQt/Debugger/MemoryWidget.h" -#include "DolphinQt/Debugger/NewBreakpointDialog.h" #include "DolphinQt/Resources.h" #include "DolphinQt/Settings.h" @@ -299,10 +299,27 @@ void BreakpointWidget::OnClear() void BreakpointWidget::OnNewBreakpoint() { - NewBreakpointDialog* dialog = new NewBreakpointDialog(this); + BreakpointDialog* dialog = new BreakpointDialog(this); dialog->exec(); } +void BreakpointWidget::OnEditBreakpoint(u32 address, bool is_instruction_bp) +{ + if (is_instruction_bp) + { + auto* dialog = new BreakpointDialog(this, PowerPC::breakpoints.GetBreakpoint(address)); + dialog->exec(); + } + else + { + auto* dialog = new BreakpointDialog(this, PowerPC::memchecks.GetMemCheck(address)); + dialog->exec(); + } + + emit BreakpointsChanged(); + Update(); +} + void BreakpointWidget::OnLoad() { IniFile ini; @@ -389,6 +406,9 @@ void BreakpointWidget::OnContextMenu() Update(); }); } + menu->addAction(tr("Edit..."), [this, bp_address, is_memory_breakpoint] { + OnEditBreakpoint(bp_address, !is_memory_breakpoint); + }); menu->exec(QCursor::pos()); } |
