mirror of https://github.com/cemu-project/Cemu.git
Debugger: Fix infinite loop in symbol storage (#1134)
This commit is contained in:
parent
4f3d4624f5
commit
5230fcab37
|
@ -45,12 +45,17 @@ public:
|
||||||
|
|
||||||
static void ClearRange(MPTR address, uint32 length)
|
static void ClearRange(MPTR address, uint32 length)
|
||||||
{
|
{
|
||||||
|
if (length == 0)
|
||||||
|
return;
|
||||||
s_lock.lock();
|
s_lock.lock();
|
||||||
while (length > 0)
|
for (;;)
|
||||||
{
|
{
|
||||||
auto itr = s_typeStorage.find(address);
|
auto itr = s_typeStorage.find(address);
|
||||||
if (itr != s_typeStorage.end())
|
if (itr != s_typeStorage.end())
|
||||||
s_typeStorage.erase(itr);
|
s_typeStorage.erase(itr);
|
||||||
|
|
||||||
|
if (length <= 4)
|
||||||
|
break;
|
||||||
address += 4;
|
address += 4;
|
||||||
length -= 4;
|
length -= 4;
|
||||||
}
|
}
|
||||||
|
@ -60,4 +65,4 @@ public:
|
||||||
private:
|
private:
|
||||||
static FSpinlock s_lock;
|
static FSpinlock s_lock;
|
||||||
static std::unordered_map<MPTR, DEBUG_SYMBOL_TYPE> s_typeStorage;
|
static std::unordered_map<MPTR, DEBUG_SYMBOL_TYPE> s_typeStorage;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue