Fix incorrect iterator usage in BreakPoints::Clear

This commit is contained in:
Jordan Woyak 2013-01-08 15:02:50 -06:00
parent b4717ca802
commit baa29f571c

View File

@ -19,7 +19,9 @@
#include "DebugInterface.h"
#include "BreakPoints.h"
#include "../../Core/Src/PowerPC/JitCommon/JitBase.h"
#include <sstream>
#include <algorithm>
bool BreakPoints::IsAddressBreakPoint(u32 _iAddress)
{
@ -110,12 +112,17 @@ void BreakPoints::Remove(u32 em_address)
void BreakPoints::Clear()
{
for (TBreakPoints::iterator i = m_BreakPoints.begin(); i != m_BreakPoints.end(); ++i)
if (jit)
{
if (jit)
jit->GetBlockCache()->InvalidateICache(i->iAddress, 4);
m_BreakPoints.erase(i);
std::for_each(m_BreakPoints.begin(), m_BreakPoints.end(),
[](const TBreakPoint& bp)
{
jit->GetBlockCache()->InvalidateICache(bp.iAddress, 4);
}
);
}
m_BreakPoints.clear();
}
MemChecks::TMemChecksStr MemChecks::GetStrings() const