diff options
| author | skidau <skidau@gmail.com> | 2014-10-28 12:53:22 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2014-10-28 12:53:22 +1100 |
| commit | 1630b0c684c837c074e2f5b9dbf5b45554dfc43e (patch) | |
| tree | 56f0fb651ba36dbbf856a6f5e0b3ef84e62aa505 /Source/Core/DolphinWX/Debugger/MemoryView.cpp | |
| parent | b13ba0680c5a717d43becd9c50dd739ff64d7c01 (diff) | |
| parent | daf977e84e82d5687bdad7589541319b4288a5dd (diff) | |
Merge pull request #1291 from skidau/debugger-step-out
Dolphin debugger enhancements
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/MemoryView.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/MemoryView.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Debugger/MemoryView.cpp b/Source/Core/DolphinWX/Debugger/MemoryView.cpp index 0fd8f48746..4effea6520 100644 --- a/Source/Core/DolphinWX/Debugger/MemoryView.cpp +++ b/Source/Core/DolphinWX/Debugger/MemoryView.cpp @@ -25,10 +25,13 @@ #include "Common/DebugInterface.h" #include "Common/StringUtil.h" #include "Core/HW/Memmap.h" +#include "DolphinWX/Frame.h" #include "DolphinWX/Globals.h" #include "DolphinWX/WxUtils.h" +#include "DolphinWX/Debugger/CodeWindow.h" #include "DolphinWX/Debugger/DebuggerUIUtil.h" #include "DolphinWX/Debugger/MemoryView.h" +#include "DolphinWX/Debugger/WatchWindow.h" enum { @@ -38,6 +41,7 @@ enum IDM_COPYCODE, IDM_RUNTOHERE, IDM_DYNARECRESULTS, + IDM_WATCHADDRESS, IDM_TOGGLEMEMORY, IDM_VIEWASFP, IDM_VIEWASASCII, @@ -161,6 +165,10 @@ void CMemoryView::OnScrollWheel(wxMouseEvent& event) void CMemoryView::OnPopupMenu(wxCommandEvent& event) { + CFrame* main_frame = (CFrame*)(GetParent()->GetParent()->GetParent()); + CCodeWindow* code_window = main_frame->g_pCodeWindow; + CWatchWindow* watch_window = code_window->m_WatchWindow; + #if wxUSE_CLIPBOARD wxTheClipboard->Open(); #endif @@ -180,6 +188,13 @@ void CMemoryView::OnPopupMenu(wxCommandEvent& event) break; #endif + case IDM_WATCHADDRESS: + debugger->AddWatch(selection); + if (watch_window) + watch_window->NotifyUpdate(); + Refresh(); + break; + case IDM_TOGGLEMEMORY: memory ^= 1; Refresh(); @@ -215,6 +230,7 @@ void CMemoryView::OnMouseDownR(wxMouseEvent& event) menu->Append(IDM_COPYADDRESS, _("Copy &address")); menu->Append(IDM_COPYHEX, _("Copy &hex")); #endif + menu->Append(IDM_WATCHADDRESS, _("Add to &watch")); menu->Append(IDM_TOGGLEMEMORY, _("Toggle &memory")); wxMenu* viewAsSubMenu = new wxMenu; |
