mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
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:
@ -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();
|
||||
|
@ -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);
|
||||
};
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -60,6 +60,7 @@ namespace Memory
|
||||
#endif
|
||||
};
|
||||
|
||||
bool IsInitialized();
|
||||
bool Init();
|
||||
bool Shutdown();
|
||||
void Clear();
|
||||
|
Reference in New Issue
Block a user