CodeView: Set Symbol End Address added
This commit is contained in:
parent
7f552581e7
commit
960344d64d
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue