finished dialogs for memory checks and breakpoints

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@76 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
fires.gc
2008-07-24 08:47:38 +00:00
parent 185a214329
commit dc717f7283
12 changed files with 137 additions and 27 deletions

View File

@ -45,14 +45,14 @@ TMemCheck::TMemCheck()
void TMemCheck::Action(u32 iValue, u32 addr, bool write, int size, u32 pc)
{
if ((write && bOnWrite) || (!write && bOnRead))
if ((write && OnWrite) || (!write && OnRead))
{
if (bLog)
if (Log)
{
const char *copy = Debugger::GetDescription(addr);
LOG(MEMMAP,"CHK %08x %s%i at %08x (%s)", iValue, write ? "Write" : "Read", size*8, addr, copy);
}
if (bBreak)
if (Break)
CCPU::Break();
}
}
@ -86,12 +86,12 @@ TMemCheck *CBreakPoints::GetMemCheck(u32 address)
{
if ((*iter).bRange)
{
if (address >= (*iter).iStartAddress && address <= (*iter).iEndAddress)
if (address >= (*iter).StartAddress && address <= (*iter).EndAddress)
return &(*iter);
}
else
{
if ((*iter).iStartAddress==address)
if ((*iter).StartAddress==address)
return &(*iter);
}
}
@ -186,7 +186,7 @@ void CBreakPoints::DeleteElementByAddress(u32 _Address)
std::vector<TMemCheck>::iterator iter;
for (iter = m_MemChecks.begin(); iter != m_MemChecks.end(); ++iter)
{
if ((*iter).iStartAddress == _Address)
if ((*iter).StartAddress == _Address)
{
m_MemChecks.erase(iter);
Host_UpdateBreakPointView();

View File

@ -33,18 +33,18 @@ struct TBreakPoint
struct TMemCheck
{
TMemCheck();
u32 iStartAddress;
u32 iEndAddress;
u32 StartAddress;
u32 EndAddress;
bool bRange;
bool bOnRead;
bool bOnWrite;
bool OnRead;
bool OnWrite;
bool bLog;
bool bBreak;
bool Log;
bool Break;
u32 numHits;
u32 numHits;
void Action(u32 _iValue, u32 addr, bool write, int size, u32 pc);
};

View File

@ -357,6 +357,9 @@ void AnalyzeBackwards()
bool GetCallstack(std::vector<SCallstackEntry> &output)
{
if (!Memory::IsInitialized())
return false;
if (!Memory::IsRAMAddress(PowerPC::ppcState.gpr[1]))
return false;

View File

@ -65,6 +65,7 @@ u8* m_pFakeVMEM = NULL;
u8* m_pEXRAM = NULL; //wii
u8* m_pEFB = NULL;
u8* m_pL1Cache = NULL;
bool m_IsInitialized = false;
MemArena g_arena;
@ -407,6 +408,12 @@ writeFn32 GetHWWriteFun32(const u32 _Address)
}
bool IsInitialized()
{
return m_IsInitialized;
}
bool Init()
{
bool wii = Core::GetStartupParameter().bWii;
@ -509,12 +516,16 @@ bool Init()
InitHWMemFuncsWii();
else
InitHWMemFuncs();
m_IsInitialized = true;
return true;
}
bool Shutdown()
{
m_IsInitialized = false;
bool wii = Core::GetStartupParameter().bWii;
g_arena.ReleaseView(m_pRAM, RAM_SIZE);

View File

@ -60,6 +60,7 @@ namespace Memory
#endif
};
bool IsInitialized();
bool Init();
bool Shutdown();
void Clear();