mirror of
https://github.com/jpd002/Play-.git
synced 2025-05-04 08:27:57 +03:00

Added ThreadViewWnd and moved some of the stack crawling stuff in MIPSAnalysis. git-svn-id: http://svn.purei.org/purei/trunk@926 b36208d7-6611-0410-8bec-b1987f11c4a2
79 lines
1.7 KiB
C++
79 lines
1.7 KiB
C++
#include "DebugView.h"
|
|
|
|
CDebugView::CDebugView(HWND hParent, CVirtualMachine& virtualMachine, CMIPS* pCtx, const StepFunction& stepFunction, const char* sName)
|
|
: m_virtualMachine(virtualMachine)
|
|
, m_pCtx(pCtx)
|
|
, m_name(sName)
|
|
, m_stepFunction(stepFunction)
|
|
, m_pDisAsmWnd(NULL)
|
|
, m_pRegViewWnd(NULL)
|
|
, m_pMemoryViewWnd(NULL)
|
|
, m_pCallStackWnd(NULL)
|
|
{
|
|
m_pDisAsmWnd = new CDisAsmWnd(hParent, virtualMachine, m_pCtx);
|
|
m_pRegViewWnd = new CRegViewWnd(hParent, virtualMachine, m_pCtx);
|
|
m_pMemoryViewWnd = new CMemoryViewMIPSWnd(hParent, virtualMachine, m_pCtx);
|
|
|
|
m_pCallStackWnd = new CCallStackWnd(hParent, virtualMachine, m_pCtx);
|
|
m_pCallStackWnd->m_OnFunctionDblClick.connect(boost::bind(&CDebugView::OnCallStackWndFunctionDblClick, this, _1));
|
|
|
|
Hide();
|
|
}
|
|
|
|
CDebugView::~CDebugView()
|
|
{
|
|
delete m_pDisAsmWnd;
|
|
delete m_pRegViewWnd;
|
|
delete m_pMemoryViewWnd;
|
|
delete m_pCallStackWnd;
|
|
}
|
|
|
|
const char* CDebugView::GetName() const
|
|
{
|
|
return m_name.c_str();
|
|
}
|
|
|
|
void CDebugView::Hide()
|
|
{
|
|
int nMethod = SW_HIDE;
|
|
|
|
m_pDisAsmWnd->Show(nMethod);
|
|
m_pMemoryViewWnd->Show(nMethod);
|
|
m_pRegViewWnd->Show(nMethod);
|
|
m_pCallStackWnd->Show(nMethod);
|
|
}
|
|
|
|
void CDebugView::Step()
|
|
{
|
|
m_stepFunction();
|
|
}
|
|
|
|
CMIPS* CDebugView::GetContext()
|
|
{
|
|
return m_pCtx;
|
|
}
|
|
|
|
CDisAsmWnd* CDebugView::GetDisassemblyWindow()
|
|
{
|
|
return m_pDisAsmWnd;
|
|
}
|
|
|
|
CMemoryViewMIPSWnd* CDebugView::GetMemoryViewWindow()
|
|
{
|
|
return m_pMemoryViewWnd;
|
|
}
|
|
|
|
CRegViewWnd* CDebugView::GetRegisterViewWindow()
|
|
{
|
|
return m_pRegViewWnd;
|
|
}
|
|
|
|
CCallStackWnd* CDebugView::GetCallStackWindow()
|
|
{
|
|
return m_pCallStackWnd;
|
|
}
|
|
|
|
void CDebugView::OnCallStackWndFunctionDblClick(uint32 nAddress)
|
|
{
|
|
m_pDisAsmWnd->SetAddress(nAddress);
|
|
}
|