diff options
| author | Sepalani <sepalani@hotmail.fr> | 2017-05-03 20:52:03 +0100 |
|---|---|---|
| committer | Sepalani <sepalani@hotmail.fr> | 2017-05-06 13:18:11 +0100 |
| commit | 960344d64d2f10404c980517d7b704acebec98d9 (patch) | |
| tree | 4fa677fad7007c0e95220e7a0c19d995d4e4a960 /Source/Core | |
| parent | 7f552581e7dca3ef68427940bd9552ec7a1e572d (diff) | |
CodeView: Set Symbol End Address added
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/CodeView.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Debugger/CodeView.cpp b/Source/Core/DolphinWX/Debugger/CodeView.cpp index 28ec7af083..22c4bbcf08 100644 --- a/Source/Core/DolphinWX/Debugger/CodeView.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeView.cpp @@ -46,6 +46,7 @@ enum IDM_FOLLOWBRANCH, IDM_RENAMESYMBOL, IDM_SETSYMBOLSIZE, + IDM_SETSYMBOLEND, IDM_PATCHALERT, IDM_COPYFUNCTION, IDM_ADDFUNCTION, @@ -365,6 +366,30 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event) } break; + case IDM_SETSYMBOLEND: + { + Symbol* symbol = m_symbol_db->GetSymbolFromAddr(m_selection); + if (!symbol) + break; + + wxTextEntryDialog dialog( + this, wxString::Format(_("Enter symbol (%s) end address:"), symbol->name.c_str()), + wxGetTextFromUserPromptStr, wxString::Format(wxT("%#08x"), symbol->address + symbol->size)); + + if (dialog.ShowModal() == wxID_OK) + { + unsigned long address; + if (dialog.GetValue().ToULong(&address, 0) && address <= std::numeric_limits<u32>::max() && + address >= symbol->address) + { + PPCAnalyst::ReanalyzeFunction(symbol->address, *symbol, address - symbol->address); + Refresh(); + Host_NotifyMapLoaded(); + } + } + } + break; + case IDM_PATCHALERT: break; @@ -392,6 +417,7 @@ void CCodeView::OnMouseUpR(wxMouseEvent& event) #endif menu.Append(IDM_RENAMESYMBOL, _("Rename &symbol"))->Enable(isSymbol); menu.Append(IDM_SETSYMBOLSIZE, _("&Set symbol size"))->Enable(isSymbol); + menu.Append(IDM_SETSYMBOLEND, _("&Set symbol end address"))->Enable(isSymbol); menu.AppendSeparator(); menu.Append(IDM_RUNTOHERE, _("&Run To Here"))->Enable(Core::IsRunning()); menu.Append(IDM_ADDFUNCTION, _("&Add function"))->Enable(Core::IsRunning()); |
