mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Assorted debugger upgrades and fixes + changed DolphinWX project not to depend on its plugins
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@169 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -29,6 +29,7 @@ enum
|
||||
IDM_COPYADDRESS,
|
||||
IDM_COPYHEX,
|
||||
IDM_COPYCODE,
|
||||
IDM_INSERTBLR,
|
||||
IDM_RUNTOHERE,
|
||||
IDM_DYNARECRESULTS,
|
||||
};
|
||||
@ -183,6 +184,13 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
}
|
||||
break;
|
||||
|
||||
case IDM_INSERTBLR:
|
||||
{
|
||||
debugger->insertBLR(selection);
|
||||
redraw();
|
||||
break;
|
||||
}
|
||||
|
||||
case IDM_DYNARECRESULTS:
|
||||
{
|
||||
// CDynaViewDlg::ViewAddr(selection);
|
||||
@ -210,6 +218,7 @@ void CCodeView::OnMouseUpR(wxMouseEvent& event)
|
||||
menu.Append(IDM_COPYHEX, wxString::FromAscii("Copy &hex"));
|
||||
#endif
|
||||
menu.Append(IDM_RUNTOHERE, _T("&Run To Here"));
|
||||
menu.Append(IDM_INSERTBLR, wxString::FromAscii("Insert &blr"));
|
||||
//menu.Append(IDM_DYNARECRESULTS, "Copy &address");
|
||||
PopupMenu(&menu);
|
||||
event.Skip(true);
|
||||
|
@ -67,6 +67,8 @@ BEGIN_EVENT_TABLE(CCodeWindow, wxFrame)
|
||||
EVT_MENU(IDM_MEMORYWINDOW, CCodeWindow::OnToggleMemoryWindow)
|
||||
|
||||
EVT_MENU(IDM_SCANFUNCTIONS, CCodeWindow::OnSymbolsMenu)
|
||||
EVT_MENU(IDM_LOADMAPFILE, CCodeWindow::OnSymbolsMenu)
|
||||
EVT_MENU(IDM_SAVEMAPFILE, CCodeWindow::OnSymbolsMenu)
|
||||
// toolbar
|
||||
EVT_MENU(IDM_DEBUG_GO, CCodeWindow::OnCodeStep)
|
||||
EVT_MENU(IDM_STEP, CCodeWindow::OnCodeStep)
|
||||
@ -261,14 +263,51 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
||||
// TODO: disable menu items instead :P
|
||||
return;
|
||||
}
|
||||
wxString path;
|
||||
switch (event.GetId())
|
||||
{
|
||||
case IDM_SCANFUNCTIONS:
|
||||
PPCAnalyst::FindFunctions(0x80003100, 0x80400000);
|
||||
PPCAnalyst::LoadFuncDB("data/totaldb.dsy");
|
||||
PPCAnalyst::LoadFuncDB("Data/totaldb.dsy");
|
||||
Debugger::GetFromAnalyzer();
|
||||
NotifyMapLoaded();
|
||||
break;
|
||||
case IDM_LOADMAPFILE:
|
||||
path = wxFileSelector(
|
||||
_T("Select the mapfile to load"),
|
||||
wxEmptyString, wxEmptyString, wxEmptyString,
|
||||
wxString::Format
|
||||
(
|
||||
_T("Map files (*.map)|*.map|All files (%s)|%s"),
|
||||
wxFileSelectorDefaultWildcardStr,
|
||||
wxFileSelectorDefaultWildcardStr
|
||||
),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST,
|
||||
this);
|
||||
if (!path)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Debugger::LoadSymbolMap(path.c_str());
|
||||
break;
|
||||
case IDM_SAVEMAPFILE:
|
||||
path = wxFileSelector(
|
||||
_T("Name your mapfile"),
|
||||
wxEmptyString, wxEmptyString, wxEmptyString,
|
||||
wxString::Format
|
||||
(
|
||||
_T("Map files (*.map)|*.map|All files (%s)|%s"),
|
||||
wxFileSelectorDefaultWildcardStr,
|
||||
wxFileSelectorDefaultWildcardStr
|
||||
),
|
||||
wxFD_SAVE,
|
||||
this);
|
||||
if (!path)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Debugger::SaveSymbolMap(path.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -434,6 +473,11 @@ void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
|
||||
}
|
||||
}
|
||||
|
||||
void CCodeWindow::OnSymbolListContextMenu(wxContextMenuEvent& event)
|
||||
{
|
||||
int index = symbols->GetSelection();
|
||||
}
|
||||
|
||||
|
||||
void CCodeWindow::OnCallstackListChange(wxCommandEvent& event)
|
||||
{
|
||||
|
@ -79,6 +79,8 @@ class CCodeWindow
|
||||
IDM_BREAKPOINTWINDOW,
|
||||
IDM_MEMORYWINDOW,
|
||||
IDM_SCANFUNCTIONS,
|
||||
IDM_LOADMAPFILE,
|
||||
IDM_SAVEMAPFILE,
|
||||
};
|
||||
|
||||
enum
|
||||
@ -109,6 +111,7 @@ class CCodeWindow
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
void OnSymbolListChange(wxCommandEvent& event);
|
||||
void OnSymbolListContextMenu(wxContextMenuEvent& event);
|
||||
void OnCallstackListChange(wxCommandEvent& event);
|
||||
void OnCodeStep(wxCommandEvent& event);
|
||||
|
||||
|
Reference in New Issue
Block a user