2010-06-07 02:23:58 +00:00
|
|
|
#include "stdafx.h"
|
2008-09-18 03:15:49 +00:00
|
|
|
#include "Debugger UI.h"
|
|
|
|
|
|
|
|
CPj64Module _Module;
|
|
|
|
|
2010-05-22 04:47:15 +00:00
|
|
|
CDebugger::CDebugger () :
|
2008-09-18 03:15:49 +00:00
|
|
|
m_MemoryDump(NULL),
|
|
|
|
m_MemoryView(NULL),
|
|
|
|
m_MemorySearch(NULL),
|
2010-05-22 04:47:15 +00:00
|
|
|
m_DebugTLB(NULL)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
CDebugger::~CDebugger (void)
|
|
|
|
{
|
|
|
|
Debug_Reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CDebugger::Debug_Reset ( void )
|
|
|
|
{
|
|
|
|
if (m_MemoryDump)
|
|
|
|
{
|
|
|
|
m_MemoryDump->HideWindow();
|
|
|
|
delete m_MemoryDump;
|
|
|
|
m_MemoryDump = NULL;
|
|
|
|
}
|
|
|
|
if (m_MemoryView)
|
|
|
|
{
|
|
|
|
m_MemoryView->HideWindow();
|
|
|
|
delete m_MemoryView;
|
|
|
|
m_MemoryView = NULL;
|
|
|
|
}
|
|
|
|
if (m_MemorySearch)
|
|
|
|
{
|
|
|
|
m_MemorySearch->HideWindow();
|
|
|
|
delete m_MemorySearch;
|
|
|
|
m_MemorySearch = NULL;
|
|
|
|
}
|
|
|
|
if (m_DebugTLB)
|
|
|
|
{
|
|
|
|
m_DebugTLB->HideWindow();
|
|
|
|
delete m_DebugTLB;
|
|
|
|
m_DebugTLB = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void CDebugger::Debug_ShowMemoryDump()
|
|
|
|
{
|
2012-11-17 01:18:00 +00:00
|
|
|
if (g_MMU == NULL)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (m_MemoryDump == NULL)
|
|
|
|
{
|
2010-05-22 04:47:15 +00:00
|
|
|
m_MemoryDump = new CDumpMemory(this);
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
if (m_MemoryDump)
|
|
|
|
{
|
|
|
|
m_MemoryDump->ShowWindow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void CDebugger::Debug_ShowMemoryWindow ( void )
|
|
|
|
{
|
2012-11-17 01:18:00 +00:00
|
|
|
if (g_MMU == NULL)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (m_MemoryView == NULL)
|
|
|
|
{
|
2010-05-22 04:47:15 +00:00
|
|
|
m_MemoryView = new CDebugMemoryView(this);
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
if (m_MemoryView)
|
|
|
|
{
|
|
|
|
m_MemoryView->ShowWindow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void CDebugger::Debug_ShowMemoryLocation ( DWORD Address, bool VAddr )
|
|
|
|
{
|
|
|
|
Debug_ShowMemoryWindow();
|
|
|
|
if (m_MemoryView)
|
|
|
|
{
|
|
|
|
m_MemoryView->ShowAddress(Address,VAddr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void CDebugger::Debug_ShowTLBWindow (void)
|
|
|
|
{
|
2012-11-17 01:18:00 +00:00
|
|
|
if (g_MMU == NULL)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (m_DebugTLB == NULL)
|
|
|
|
{
|
2010-05-22 04:47:15 +00:00
|
|
|
m_DebugTLB = new CDebugTlb(this);
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
if (m_DebugTLB)
|
|
|
|
{
|
|
|
|
m_DebugTLB->ShowWindow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void CDebugger::Debug_RefreshTLBWindow(void)
|
|
|
|
{
|
|
|
|
if (m_DebugTLB)
|
|
|
|
{
|
|
|
|
m_DebugTLB->RefreshTLBWindow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void CDebugger::Debug_ShowMemorySearch()
|
|
|
|
{
|
|
|
|
if (m_MemorySearch == NULL)
|
|
|
|
{
|
2010-05-22 04:47:15 +00:00
|
|
|
m_MemorySearch = new CDebugMemorySearch(this);
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
if (m_MemorySearch)
|
|
|
|
{
|
|
|
|
m_MemorySearch->ShowWindow();
|
|
|
|
}
|
|
|
|
}
|