mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-03 20:54:28 +00:00
Fix the DSPLLE debugger window.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7007 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
424b8fd6b3
commit
b6251ba674
@ -251,7 +251,7 @@ int DSPCore_RunCycles(int cycles)
|
|||||||
if (dspjit)
|
if (dspjit)
|
||||||
{
|
{
|
||||||
cyclesLeft = cycles;
|
cyclesLeft = cycles;
|
||||||
CompiledCode pExecAddr = (CompiledCode)dspjit->enterDispatcher;
|
DSPCompiledCode pExecAddr = (DSPCompiledCode)dspjit->enterDispatcher;
|
||||||
pExecAddr();
|
pExecAddr();
|
||||||
|
|
||||||
if (g_dsp.external_interrupt_waiting)
|
if (g_dsp.external_interrupt_waiting)
|
||||||
|
@ -37,7 +37,7 @@ DSPEmitter::DSPEmitter() : gpr(*this), storeIndex(-1), storeIndex2(-1)
|
|||||||
|
|
||||||
AllocCodeSpace(COMPILED_CODE_SIZE);
|
AllocCodeSpace(COMPILED_CODE_SIZE);
|
||||||
|
|
||||||
blocks = new CompiledCode[MAX_BLOCKS];
|
blocks = new DSPCompiledCode[MAX_BLOCKS];
|
||||||
blockLinks = new Block[MAX_BLOCKS];
|
blockLinks = new Block[MAX_BLOCKS];
|
||||||
blockSize = new u16[MAX_BLOCKS];
|
blockSize = new u16[MAX_BLOCKS];
|
||||||
unresolvedJumps = new std::list<u16>[MAX_BLOCKS];
|
unresolvedJumps = new std::list<u16>[MAX_BLOCKS];
|
||||||
@ -52,7 +52,7 @@ DSPEmitter::DSPEmitter() : gpr(*this), storeIndex(-1), storeIndex2(-1)
|
|||||||
//clear all of the block references
|
//clear all of the block references
|
||||||
for(int i = 0x0000; i < MAX_BLOCKS; i++)
|
for(int i = 0x0000; i < MAX_BLOCKS; i++)
|
||||||
{
|
{
|
||||||
blocks[i] = (CompiledCode)stubEntryPoint;
|
blocks[i] = (DSPCompiledCode)stubEntryPoint;
|
||||||
blockLinks[i] = 0;
|
blockLinks[i] = 0;
|
||||||
blockSize[i] = 0;
|
blockSize[i] = 0;
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ void DSPEmitter::ClearIRAM() {
|
|||||||
// ClearCodeSpace();
|
// ClearCodeSpace();
|
||||||
for(int i = 0x0000; i < 0x1000; i++)
|
for(int i = 0x0000; i < 0x1000; i++)
|
||||||
{
|
{
|
||||||
blocks[i] = (CompiledCode)stubEntryPoint;
|
blocks[i] = (DSPCompiledCode)stubEntryPoint;
|
||||||
blockLinks[i] = 0;
|
blockLinks[i] = 0;
|
||||||
blockSize[i] = 0;
|
blockSize[i] = 0;
|
||||||
}
|
}
|
||||||
@ -338,7 +338,7 @@ void DSPEmitter::Compile(u16 start_addr)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
blocks[start_addr] = (CompiledCode)entryPoint;
|
blocks[start_addr] = (DSPCompiledCode)entryPoint;
|
||||||
|
|
||||||
// Mark this block as a linkable destination if it does not contain
|
// Mark this block as a linkable destination if it does not contain
|
||||||
// any unresolved CALL's
|
// any unresolved CALL's
|
||||||
@ -356,7 +356,7 @@ void DSPEmitter::Compile(u16 start_addr)
|
|||||||
if (unresolvedJumps[i].size() < size)
|
if (unresolvedJumps[i].size() < size)
|
||||||
{
|
{
|
||||||
// Mark the block to be recompiled again
|
// Mark the block to be recompiled again
|
||||||
blocks[i] = (CompiledCode)stubEntryPoint;
|
blocks[i] = (DSPCompiledCode)stubEntryPoint;
|
||||||
blockLinks[i] = 0;
|
blockLinks[i] = 0;
|
||||||
blockSize[i] = 0;
|
blockSize[i] = 0;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#define MAX_BLOCKS 0x10000
|
#define MAX_BLOCKS 0x10000
|
||||||
|
|
||||||
typedef u32 (*CompiledCode)();
|
typedef u32 (*DSPCompiledCode)();
|
||||||
typedef const u8 *Block;
|
typedef const u8 *Block;
|
||||||
|
|
||||||
class DSPEmitter : public Gen::XCodeBlock, NonCopyable
|
class DSPEmitter : public Gen::XCodeBlock, NonCopyable
|
||||||
@ -264,7 +264,7 @@ public:
|
|||||||
void SaveDSPRegs();
|
void SaveDSPRegs();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CompiledCode *blocks;
|
DSPCompiledCode *blocks;
|
||||||
Block blockLinkEntry;
|
Block blockLinkEntry;
|
||||||
u16 compileSR;
|
u16 compileSR;
|
||||||
|
|
||||||
|
@ -14,4 +14,4 @@ set(SRCS Src/BreakpointDlg.cpp
|
|||||||
Src/RegisterWindow.cpp)
|
Src/RegisterWindow.cpp)
|
||||||
|
|
||||||
add_library(debwx STATIC ${SRCS})
|
add_library(debwx STATIC ${SRCS})
|
||||||
target_link_libraries(debwx common debugger_ui_util)
|
target_link_libraries(debwx common core debugger_ui_util)
|
||||||
|
@ -139,6 +139,7 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
|
|||||||
, m_BreakpointWindow(NULL)
|
, m_BreakpointWindow(NULL)
|
||||||
, m_MemoryWindow(NULL)
|
, m_MemoryWindow(NULL)
|
||||||
, m_JitWindow(NULL)
|
, m_JitWindow(NULL)
|
||||||
|
, m_SoundWindow(NULL)
|
||||||
, m_VideoWindow(NULL)
|
, m_VideoWindow(NULL)
|
||||||
, codeview(NULL)
|
, codeview(NULL)
|
||||||
{
|
{
|
||||||
|
@ -37,6 +37,7 @@ class CBreakPointWindow;
|
|||||||
class CMemoryWindow;
|
class CMemoryWindow;
|
||||||
class CJitWindow;
|
class CJitWindow;
|
||||||
class CCodeView;
|
class CCodeView;
|
||||||
|
class DSPDebuggerLLE;
|
||||||
class GFXDebuggerPanel;
|
class GFXDebuggerPanel;
|
||||||
|
|
||||||
class CCodeWindow
|
class CCodeWindow
|
||||||
@ -107,6 +108,7 @@ class CCodeWindow
|
|||||||
CBreakPointWindow* m_BreakpointWindow;
|
CBreakPointWindow* m_BreakpointWindow;
|
||||||
CMemoryWindow* m_MemoryWindow;
|
CMemoryWindow* m_MemoryWindow;
|
||||||
CJitWindow* m_JitWindow;
|
CJitWindow* m_JitWindow;
|
||||||
|
DSPDebuggerLLE* m_SoundWindow;
|
||||||
GFXDebuggerPanel* m_VideoWindow;
|
GFXDebuggerPanel* m_VideoWindow;
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "MemoryWindow.h"
|
#include "MemoryWindow.h"
|
||||||
#include "JitWindow.h"
|
#include "JitWindow.h"
|
||||||
#include "DebuggerPanel.h"
|
#include "DebuggerPanel.h"
|
||||||
|
#include "DSPDebugWindow.h"
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
|
|
||||||
#include "CodeWindow.h"
|
#include "CodeWindow.h"
|
||||||
@ -516,7 +517,6 @@ void CCodeWindow::ToggleJitWindow(bool bShow)
|
|||||||
void CCodeWindow::ToggleSoundWindow(bool bShow)
|
void CCodeWindow::ToggleSoundWindow(bool bShow)
|
||||||
{
|
{
|
||||||
// TODO: Resurrect DSP debugger window.
|
// TODO: Resurrect DSP debugger window.
|
||||||
#if 0
|
|
||||||
GetMenuBar()->FindItem(IDM_SOUNDWINDOW)->Check(bShow);
|
GetMenuBar()->FindItem(IDM_SOUNDWINDOW)->Check(bShow);
|
||||||
if (bShow)
|
if (bShow)
|
||||||
{
|
{
|
||||||
@ -531,7 +531,6 @@ void CCodeWindow::ToggleSoundWindow(bool bShow)
|
|||||||
Parent->DoRemovePage(m_SoundWindow, false);
|
Parent->DoRemovePage(m_SoundWindow, false);
|
||||||
m_SoundWindow = NULL;
|
m_SoundWindow = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCodeWindow::ToggleVideoWindow(bool bShow)
|
void CCodeWindow::ToggleVideoWindow(bool bShow)
|
||||||
|
@ -39,11 +39,13 @@ BEGIN_EVENT_TABLE(DSPDebuggerLLE, wxPanel)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent)
|
DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
|
||||||
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(700, 800),
|
: wxPanel(parent, id, wxDefaultPosition, wxDefaultSize,
|
||||||
wxTAB_TRAVERSAL, _("DSP LLE Debugger"))
|
wxTAB_TRAVERSAL, _("DSP LLE Debugger"))
|
||||||
, m_CachedStepCounter(-1)
|
, m_CachedStepCounter(-1)
|
||||||
{
|
{
|
||||||
|
m_DebuggerFrame = this;
|
||||||
|
|
||||||
// notify wxAUI which frame to use
|
// notify wxAUI which frame to use
|
||||||
m_mgr.SetManagedWindow(this);
|
m_mgr.SetManagedWindow(this);
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class CMemoryView;
|
|||||||
class DSPDebuggerLLE : public wxPanel
|
class DSPDebuggerLLE : public wxPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DSPDebuggerLLE(wxWindow *parent);
|
DSPDebuggerLLE(wxWindow *parent, wxWindowID id = wxID_ANY);
|
||||||
virtual ~DSPDebuggerLLE();
|
virtual ~DSPDebuggerLLE();
|
||||||
|
|
||||||
void Refresh();
|
void Refresh();
|
||||||
@ -86,15 +86,15 @@ private:
|
|||||||
|
|
||||||
void OnClose(wxCloseEvent& event);
|
void OnClose(wxCloseEvent& event);
|
||||||
void OnChangeState(wxCommandEvent& event);
|
void OnChangeState(wxCommandEvent& event);
|
||||||
void OnRightClick(wxListEvent& event);
|
//void OnRightClick(wxListEvent& event);
|
||||||
void OnDoubleClick(wxListEvent& event);
|
//void OnDoubleClick(wxListEvent& event);
|
||||||
void OnAddrBoxChange(wxCommandEvent& event);
|
void OnAddrBoxChange(wxCommandEvent& event);
|
||||||
void OnSymbolListChange(wxCommandEvent& event);
|
void OnSymbolListChange(wxCommandEvent& event);
|
||||||
|
|
||||||
bool JumpToAddress(u16 addr);
|
bool JumpToAddress(u16 addr);
|
||||||
|
|
||||||
void FocusOnPC();
|
void FocusOnPC();
|
||||||
void UnselectAll();
|
//void UnselectAll();
|
||||||
};
|
};
|
||||||
|
|
||||||
extern DSPDebuggerLLE* m_DebuggerFrame;
|
extern DSPDebuggerLLE* m_DebuggerFrame;
|
||||||
|
@ -50,6 +50,8 @@ GFXDebuggerPanel::GFXDebuggerPanel(wxWindow *parent, wxWindowID id, const wxPoin
|
|||||||
const wxSize& size, long style, const wxString &title)
|
const wxSize& size, long style, const wxString &title)
|
||||||
: wxPanel(parent, id, position, size, style, title)
|
: wxPanel(parent, id, position, size, style, title)
|
||||||
{
|
{
|
||||||
|
g_pdebugger = this;
|
||||||
|
|
||||||
CreateGUIControls();
|
CreateGUIControls();
|
||||||
|
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
@ -57,6 +59,7 @@ GFXDebuggerPanel::GFXDebuggerPanel(wxWindow *parent, wxWindowID id, const wxPoin
|
|||||||
|
|
||||||
GFXDebuggerPanel::~GFXDebuggerPanel()
|
GFXDebuggerPanel::~GFXDebuggerPanel()
|
||||||
{
|
{
|
||||||
|
g_pdebugger = NULL;
|
||||||
GFXDebuggerPauseFlag = false;
|
GFXDebuggerPauseFlag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,8 +137,6 @@ static const int numPauseEventMap = sizeof(pauseEventMap)/sizeof(PauseEventMap);
|
|||||||
|
|
||||||
void GFXDebuggerPanel::CreateGUIControls()
|
void GFXDebuggerPanel::CreateGUIControls()
|
||||||
{
|
{
|
||||||
g_pdebugger = this;
|
|
||||||
|
|
||||||
// Basic settings
|
// Basic settings
|
||||||
CenterOnParent();
|
CenterOnParent();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user