mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-03-04 20:27:57 +00:00
Merge pull request #5004 from unknownbrackets/debugger
Don't hashmap functions smaller than 16 bytes
This commit is contained in:
commit
7ae7807658
@ -187,7 +187,7 @@ namespace MIPSAnalyst {
|
|||||||
hashToFunction.clear();
|
hashToFunction.clear();
|
||||||
for (auto iter = functions.begin(); iter != functions.end(); iter++) {
|
for (auto iter = functions.begin(); iter != functions.end(); iter++) {
|
||||||
AnalyzedFunction &f = *iter;
|
AnalyzedFunction &f = *iter;
|
||||||
if (f.hasHash) {
|
if (f.hasHash && f.size > 16) {
|
||||||
hashToFunction[f.hash].push_back(&f);
|
hashToFunction[f.hash].push_back(&f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -459,7 +459,7 @@ skip:
|
|||||||
for (auto iter = functions.begin(); iter != functions.end(); iter++) {
|
for (auto iter = functions.begin(); iter != functions.end(); iter++) {
|
||||||
if (iter->start == startAddr) {
|
if (iter->start == startAddr) {
|
||||||
// Let's just add it to the hashmap.
|
// Let's just add it to the hashmap.
|
||||||
if (iter->hasHash && size) {
|
if (iter->hasHash && size > 16) {
|
||||||
HashMapFunc hfun;
|
HashMapFunc hfun;
|
||||||
hfun.hash = iter->hash;
|
hfun.hash = iter->hash;
|
||||||
strncpy(hfun.name, name, 64);
|
strncpy(hfun.name, name, 64);
|
||||||
@ -467,7 +467,7 @@ skip:
|
|||||||
hfun.size = size;
|
hfun.size = size;
|
||||||
hashMap.insert(hfun);
|
hashMap.insert(hfun);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else if (!iter->hasHash || size == 0) {
|
||||||
ERROR_LOG(HLE, "%s: %08x %08x : match but no hash (%i) or no size", name, startAddr, size, iter->hasHash);
|
ERROR_LOG(HLE, "%s: %08x %08x : match but no hash (%i) or no size", name, startAddr, size, iter->hasHash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user