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:
hrydgard 2008-08-10 18:21:16 +00:00
parent 4cec78a13b
commit f9019d0ad3
14 changed files with 115 additions and 36 deletions

View File

@ -1010,7 +1010,7 @@
// Default is 1.
//
// Recommended setting: 1
#define wxUSE_CLIPBOARD 0
#define wxUSE_CLIPBOARD 1
// Use wxDataObject and related classes. Needed for clipboard and OLE drag and
// drop

View File

@ -1144,6 +1144,8 @@ namespace Gen
// WARNING not REX compatible
void PSRAW(X64Reg reg, int shift) {
if (reg > 7)
PanicAlert("The PSRAW-emitter does not support regs above 7");
Write8(0x66);
Write8(0x0f);
Write8(0x71);
@ -1153,12 +1155,25 @@ namespace Gen
// WARNING not REX compatible
void PSRAD(X64Reg reg, int shift) {
if (reg > 7)
PanicAlert("The PSRAD-emitter does not support regs above 7");
Write8(0x66);
Write8(0x0f);
Write8(0x72);
Write8(0xE0 | reg);
Write8(shift);
}
void PSHUFB(X64Reg dest, OpArg arg) {
INT3(); //still untested
Write8(0x66);
arg.WriteRex(false);
Write8(0x0f);
Write8(0x38);
Write8(0x00);
arg.WriteRest(0);
}
void PAND(X64Reg dest, OpArg arg) {WriteSSEOp(64, 0xDB, true, dest, arg);}
void PANDN(X64Reg dest, OpArg arg) {WriteSSEOp(64, 0xDF, true, dest, arg);}
void PXOR(X64Reg dest, OpArg arg) {WriteSSEOp(64, 0xEF, true, dest, arg);}
@ -1230,7 +1245,7 @@ namespace Gen
// Don't really need to do anything
#elif defined(_M_X64)
#if _WIN32
int stacksize = ((maxCallParams+1)&~1)*8 + 8;
int stacksize = ((maxCallParams + 1) & ~1)*8 + 8;
// Set up a stack frame so that we can call functions
// TODO: use maxCallParams
SUB(64, R(RSP), Imm8(stacksize));

View File

@ -493,6 +493,7 @@ namespace Gen
void PMINUB(X64Reg dest, OpArg arg);
void PMOVMSKB(X64Reg dest, OpArg arg);
void PSHUFB(X64Reg dest, OpArg arg);
namespace Util
{

View File

@ -20,6 +20,7 @@ public:
virtual void setPC(unsigned int /*address*/) {}
virtual void step() {}
virtual void runToBreakpoint() {}
virtual void insertBLR(unsigned int address) {}
virtual int getColor(unsigned int /*address*/){return 0xFFFFFFFF;}
virtual std::string getDescription(unsigned int /*address*/) = 0;
};

View File

@ -70,7 +70,12 @@ void PPCDebugInterface::clearAllBreakpoints() {}
void PPCDebugInterface::toggleBreakpoint(unsigned int address)
{
CBreakPoints::IsAddressBreakPoint(address)?CBreakPoints::RemoveBreakPoint(address):CBreakPoints::AddBreakPoint(address);
CBreakPoints::IsAddressBreakPoint(address) ? CBreakPoints::RemoveBreakPoint(address) : CBreakPoints::AddBreakPoint(address);
}
void PPCDebugInterface::insertBLR(unsigned int address)
{
Memory::Write_U32(0x4e800020, address);
}
int PPCDebugInterface::getColor(unsigned int address)

View File

@ -22,6 +22,7 @@ public:
virtual void setPC(unsigned int address);
virtual void step() {}
virtual void runToBreakpoint();
virtual void insertBLR(unsigned int address);
virtual int getColor(unsigned int address);
virtual std::string getDescription(unsigned int address);
};

View File

@ -884,11 +884,14 @@ bool IsRAMAddress(const u32 addr)
case 0x00:
case 0x80:
case 0xC0:
return true;
if ((addr & 0x1FFFFFFF) < RAM_SIZE)
return true;
else
return false;
case 0x10:
case 0x90:
case 0xD0:
if (Core::g_CoreStartupParameter.bWii)
if (Core::g_CoreStartupParameter.bWii && (addr & 0x1FFFFFFF) < EXRAM_SIZE)
return true;
else
return false;

View File

@ -623,10 +623,13 @@ void PPCAnalyst::FindFunctionsFromBranches(u32 startAddr, u32 endAddr)
{
if (instr.LK) //bl
{
u32 target = SignExt26(instr.LI<<2);
u32 target = SignExt26(instr.LI << 2);
if (!instr.AA)
target += addr;
PPCAnalyst::AddFunction(target);
if (Memory::IsRAMAddress(target))
{
PPCAnalyst::AddFunction(target);
}
}
}
break;

View File

@ -186,8 +186,8 @@ GekkoOPTemplate primarytable[] =
{54, CInterpreter::stfd, Jit64::stfd, {"stfd", OPTYPE_STOREFP, 0}},
{55, CInterpreter::stfdu, Jit64::Default, {"stfdu", OPTYPE_STOREFP, 0}},
{46, CInterpreter::lmw, Jit64::lmw, {"lmw", OPTYPE_SYSTEM, 0}},
{47, CInterpreter::stmw, Jit64::stmw, {"stmw", OPTYPE_SYSTEM, 0}},
{46, CInterpreter::lmw, Jit64::lmw, {"lmw", OPTYPE_SYSTEM, 0, 10}},
{47, CInterpreter::stmw, Jit64::stmw, {"stmw", OPTYPE_SYSTEM, 0, 10}},
{56, CInterpreter::psq_l, Jit64::psq_l, {"psq_l", OPTYPE_PS, 0}},
{57, CInterpreter::psq_lu, Jit64::psq_l, {"psq_lu", OPTYPE_PS, 0}},

View File

@ -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);

View File

@ -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)
{

View File

@ -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);

View File

@ -379,7 +379,6 @@ CFrame::OnOpen(wxCommandEvent& WXUNUSED (event))
),
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this);
if (!path)
{
return;

View File

@ -3,16 +3,16 @@ Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Core", "Core\Core\Core.vcproj", "{F0B874CB-4476-4199-9315-8343D05AE684}"
ProjectSection(ProjectDependencies) = postProject
{B7F1A9FB-BEA8-416E-9460-AE35A6A5165C} = {B7F1A9FB-BEA8-416E-9460-AE35A6A5165C}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
{29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
{B7F1A9FB-BEA8-416E-9460-AE35A6A5165C} = {B7F1A9FB-BEA8-416E-9460-AE35A6A5165C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoDX9", "Plugins\Plugin_VideoDX9\Plugin_VideoDX9.vcproj", "{636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18}"
ProjectSection(ProjectDependencies) = postProject
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA} = {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}
{3E03C179-8251-46E4-81F4-466F114BAC63} = {3E03C179-8251-46E4-81F4-466F114BAC63}
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA} = {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_PadSimple", "Plugins\Plugin_PadSimple\Plugin_PadSimple.vcproj", "{9A183B48-ECC2-4121-876A-9B3793686073}"
@ -33,29 +33,24 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DiscIO", "Core\DiscIO\DiscI
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoOGL", "Plugins\Plugin_VideoOGL\Plugin_VideoOGL.vcproj", "{CFDCEE0E-FA45-4F72-9FCC-0B88F5A75160}"
ProjectSection(ProjectDependencies) = postProject
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA} = {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}
{48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}
{0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0}
{48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA} = {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Core\Common\Common.vcproj", "{C573CAF7-EE6A-458E-8049-16C0BF34C2E9}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DolphinWX", "Core\DolphinWX\DolphinWX.vcproj", "{A72606EF-C5C1-4954-90AD-F0F93A8D97D9}"
ProjectSection(ProjectDependencies) = postProject
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F} = {9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}
{636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18} = {636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18}
{C60D0E7A-ED05-4C67-9EE7-3A6C0D7801C8} = {C60D0E7A-ED05-4C67-9EE7-3A6C0D7801C8}
{29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510}
{48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}
{CFDCEE0E-FA45-4F72-9FCC-0B88F5A75160} = {CFDCEE0E-FA45-4F72-9FCC-0B88F5A75160}
{9A183B48-ECC2-4121-876A-9B3793686073} = {9A183B48-ECC2-4121-876A-9B3793686073}
{3E03C179-8251-46E4-81F4-466F114BAC63} = {3E03C179-8251-46E4-81F4-466F114BAC63}
{0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0}
{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77} = {4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}
{F0B874CB-4476-4199-9315-8343D05AE684} = {F0B874CB-4476-4199-9315-8343D05AE684}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
{B7F1A9FB-BEA8-416E-9460-AE35A6A5165C} = {B7F1A9FB-BEA8-416E-9460-AE35A6A5165C}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
{F0B874CB-4476-4199-9315-8343D05AE684} = {F0B874CB-4476-4199-9315-8343D05AE684}
{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77} = {4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}
{0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0}
{3E03C179-8251-46E4-81F4-466F114BAC63} = {3E03C179-8251-46E4-81F4-466F114BAC63}
{48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}
{29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxBase28", "..\Externals\wxWidgets\build\msw\wx_base.vcproj", "{48AD7E0A-25B1-4974-A1E3-03F8C438D34F}"
@ -64,11 +59,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxCore28", "..\Externals\wx
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DebuggerWX", "Core\DebuggerWX\DebuggerWX.vcproj", "{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}"
ProjectSection(ProjectDependencies) = postProject
{48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}
{0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0}
{29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510}
{F0B874CB-4476-4199-9315-8343D05AE684} = {F0B874CB-4476-4199-9315-8343D05AE684}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
{F0B874CB-4476-4199-9315-8343D05AE684} = {F0B874CB-4476-4199-9315-8343D05AE684}
{29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510}
{0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0}
{48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_DSP_NULL", "Plugins\Plugin_DSP_NULL\Plugin_DSP_NULL.vcproj", "{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}"
@ -85,9 +80,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_PadDX9", "Plugins\Pl
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_nJoy_SDL", "Plugins\Plugin_nJoy_SDL\Plugin_nJoy_SDL.vcproj", "{521498BE-6089-4780-8223-E67C22F4E068}"
ProjectSection(ProjectDependencies) = postProject
{0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0}
{48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
{48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}
{0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0}
EndProjectSection
EndProject
Global