diff options
| author | hrydgard <hrydgard@gmail.com> | 2008-08-24 15:46:08 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2008-08-24 15:46:08 +0000 |
| commit | f44a06465ab2d05c6db793e02aa0aba787bafdda (patch) | |
| tree | 79c1965524996469cff5443c0e266af249e684b2 /Source/Core/DebuggerWX | |
| parent | e3d7c44a8e42a1c44e1d75bd159fdba825af210e (diff) | |
Change some project settings. Reorganize the symbol database code, step 1/2.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@292 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX')
| -rw-r--r-- | Source/Core/DebuggerWX/DebuggerWX.vcproj | 49 | ||||
| -rw-r--r-- | Source/Core/DebuggerWX/src/CodeWindow.cpp | 62 | ||||
| -rw-r--r-- | Source/Core/DebuggerWX/src/CodeWindow.h | 5 | ||||
| -rw-r--r-- | Source/Core/DebuggerWX/src/MemoryWindow.cpp | 2 |
4 files changed, 80 insertions, 38 deletions
diff --git a/Source/Core/DebuggerWX/DebuggerWX.vcproj b/Source/Core/DebuggerWX/DebuggerWX.vcproj index 5c3a87493c..7612ee032b 100644 --- a/Source/Core/DebuggerWX/DebuggerWX.vcproj +++ b/Source/Core/DebuggerWX/DebuggerWX.vcproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="8,00"
+ Version="8.00"
Name="DebuggerWX"
ProjectGUID="{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}"
RootNamespace="DebuggerWX"
@@ -52,7 +52,7 @@ RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
- WarnAsError="true"
+ WarnAsError="false"
DebugInformationFormat="4"
/>
<Tool
@@ -85,7 +85,7 @@ />
</Configuration>
<Configuration
- Name="Release|Win32"
+ Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
@@ -106,16 +106,20 @@ />
<Tool
Name="VCMIDLTool"
+ TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
+ Optimization="0"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\Core\Src;;..\Common\Src;..\..\..\Externals\Bochs_disasm"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__"
- RuntimeLibrary="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__WXMSW__"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
- WarnAsError="true"
+ WarnAsError="false"
DebugInformationFormat="3"
/>
<Tool
@@ -148,7 +152,7 @@ />
</Configuration>
<Configuration
- Name="DebugFast|Win32"
+ Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
@@ -172,16 +176,15 @@ />
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\Core\Src;;..\Common\Src;..\..\..\Externals\Bochs_disasm"
- PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
- MinimalRebuild="true"
- BasicRuntimeChecks="0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__"
RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableEnhancedInstructionSet="2"
UsePrecompiledHeader="0"
WarningLevel="3"
- WarnAsError="true"
+ WarnAsError="false"
DebugInformationFormat="3"
/>
<Tool
@@ -214,7 +217,7 @@ />
</Configuration>
<Configuration
- Name="Debug|x64"
+ Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
@@ -239,15 +242,14 @@ />
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\Core\Src;;..\Common\Src;..\..\..\Externals\Bochs_disasm"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__WXMSW__"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
UsePrecompiledHeader="0"
WarningLevel="3"
+ WarnAsError="false"
DebugInformationFormat="3"
/>
<Tool
@@ -280,7 +282,7 @@ />
</Configuration>
<Configuration
- Name="Release|x64"
+ Name="DebugFast|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
@@ -301,17 +303,21 @@ />
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
+ Optimization="0"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\Core\Src;;..\Common\Src;..\..\..\Externals\Bochs_disasm"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__"
+ PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
RuntimeLibrary="0"
BufferSecurityCheck="false"
+ EnableEnhancedInstructionSet="2"
UsePrecompiledHeader="0"
WarningLevel="3"
+ WarnAsError="false"
DebugInformationFormat="3"
/>
<Tool
@@ -378,6 +384,7 @@ RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
+ WarnAsError="false"
DebugInformationFormat="3"
/>
<Tool
diff --git a/Source/Core/DebuggerWX/src/CodeWindow.cpp b/Source/Core/DebuggerWX/src/CodeWindow.cpp index be110880d6..3a156d0f95 100644 --- a/Source/Core/DebuggerWX/src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/src/CodeWindow.cpp @@ -48,6 +48,8 @@ #include "Debugger/PPCDebugInterface.h"
#include "Debugger/Debugger_SymbolMap.h"
#include "PowerPC/PPCAnalyst.h"
+#include "PowerPC/FunctionDB.h"
+#include "PowerPC/SignatureDB.h"
#include "PowerPC/PPCTables.h"
#include "PowerPC/Jit64/Jit.h"
#include "PowerPC/Jit64/JitCache.h"
@@ -72,8 +74,9 @@ 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)
+ EVT_MENU(IDM_CREATESIGNATUREFILE, CCodeWindow::OnSymbolsMenu)
+ EVT_MENU(IDM_USESIGNATUREFILE, CCodeWindow::OnSymbolsMenu)
EVT_MENU(IDM_CLEARCODECACHE, CCodeWindow::OnJitMenu)
EVT_MENU(IDM_LOGINSTRUCTIONS, CCodeWindow::OnJitMenu)
@@ -243,9 +246,11 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam {
wxMenu *pSymbolsMenu = new wxMenu;
- pSymbolsMenu->Append(IDM_SCANFUNCTIONS, _T("&Load symbol map"));
+ pSymbolsMenu->Append(IDM_SCANFUNCTIONS, _T("&Load/generate symbol map"));
pSymbolsMenu->Append(IDM_SAVEMAPFILE, _T("&Save symbol map"));
- pSymbolsMenu->Append(IDM_RENAMEFUNCTION, _T("&Rename function..."));
+ pSymbolsMenu->AppendSeparator();
+ pSymbolsMenu->Append(IDM_CREATESIGNATUREFILE, _T("&Create signature file..."));
+ pSymbolsMenu->Append(IDM_USESIGNATUREFILE, _T("&Use signature file..."));
pMenuBar->Append(pSymbolsMenu, _T("&Symbols"));
}
@@ -303,22 +308,51 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event) case IDM_SCANFUNCTIONS:
if (!File::Exists(mapfile))
{
- PPCAnalyst::FindFunctions(0x80003100, 0x80400000);
- if (PPCAnalyst::LoadFuncDB("Data/totaldb.dsy"))
- {
- Debugger::GetFromAnalyzer();
- NotifyMapLoaded();
- }
+ g_funcDB.Clear();
+ PPCAnalyst::FindFunctions(0x80000000, 0x80400000, &g_funcDB);
+ SignatureDB db;
+ if (db.Load("data/totaldb.dsy"))
+ db.Apply(&g_funcDB);
+ Debugger::GetFromAnalyzer();
} else {
Debugger::LoadSymbolMap(mapfile.c_str());
+ Debugger::PushMapToFunctionDB(&g_funcDB);
}
+ Host_NotifyMapLoaded();
break;
-// case IDM_LOADMAPFILE:
-// Debugger::LoadSymbolMap(mapfile.c_str());
-// break;
case IDM_SAVEMAPFILE:
Debugger::SaveSymbolMap(mapfile.c_str());
break;
+ case IDM_CREATESIGNATUREFILE:
+ {
+ wxString path = wxFileSelector(
+ _T("Save signature as"), wxEmptyString, wxEmptyString, wxEmptyString,
+ _T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_SAVE,
+ this);
+ if (path) {
+ SignatureDB db;
+ db.Initialize(&g_funcDB);
+ std::string filename(path.ToAscii()); // PPCAnalyst::SaveSignatureDB(
+ db.Save(path.ToAscii());
+ }
+ }
+ break;
+ case IDM_USESIGNATUREFILE:
+ {
+ wxString path = wxFileSelector(
+ _T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString,
+ _T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST,
+ this);
+ if (path) {
+ SignatureDB db;
+ db.Load(path.ToAscii());
+ db.Apply(&g_funcDB);
+ Debugger::Reset();
+ Debugger::GetFromAnalyzer();
+ }
+ }
+ Host_NotifyMapLoaded();
+ break;
}
}
@@ -395,7 +429,7 @@ void CCodeWindow::Update() callstack->Clear();
- std::vector<Debugger::SCallstackEntry>stack;
+ std::vector<Debugger::CallstackEntry> stack;
if (Debugger::GetCallstack(stack))
{
@@ -474,7 +508,7 @@ void CCodeWindow::UpdateButtonStates() void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
{
int index = symbols->GetSelection();
- Debugger::CSymbol* pSymbol = static_cast<Debugger::CSymbol*>(symbols->GetClientData(index));
+ Debugger::Symbol* pSymbol = static_cast<Debugger::Symbol *>(symbols->GetClientData(index));
if (pSymbol != NULL)
{
diff --git a/Source/Core/DebuggerWX/src/CodeWindow.h b/Source/Core/DebuggerWX/src/CodeWindow.h index 0276a99c60..45e965928e 100644 --- a/Source/Core/DebuggerWX/src/CodeWindow.h +++ b/Source/Core/DebuggerWX/src/CodeWindow.h @@ -81,9 +81,10 @@ class CCodeWindow IDM_MEMORYWINDOW,
IDM_SCANFUNCTIONS,
IDM_LOGINSTRUCTIONS,
- IDM_LOADMAPFILE,
IDM_SAVEMAPFILE,
- IDM_RENAMEFUNCTION,
+ IDM_CREATESIGNATUREFILE,
+ IDM_USESIGNATUREFILE,
+ IDM_USESYMBOLFILE,
IDM_CLEARCODECACHE,
};
diff --git a/Source/Core/DebuggerWX/src/MemoryWindow.cpp b/Source/Core/DebuggerWX/src/MemoryWindow.cpp index fac7a46e3a..7e276d8b5a 100644 --- a/Source/Core/DebuggerWX/src/MemoryWindow.cpp +++ b/Source/Core/DebuggerWX/src/MemoryWindow.cpp @@ -167,7 +167,7 @@ void CMemoryWindow::NotifyMapLoaded() void CMemoryWindow::OnSymbolListChange(wxCommandEvent& event)
{
int index = symbols->GetSelection();
- Debugger::CSymbol* pSymbol = static_cast<Debugger::CSymbol*>(symbols->GetClientData(index));
+ Debugger::Symbol* pSymbol = static_cast<Debugger::Symbol*>(symbols->GetClientData(index));
if (pSymbol != NULL)
{
|
