mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Debugger: Ignore unmarked mem block info in find.
We start with a large unmarked region which we break up. Ignore this.
This commit is contained in:
parent
616850663c
commit
595a17e9bc
@ -128,8 +128,10 @@ bool MemSlabMap::Find(MemBlockFlags flags, uint32_t addr, uint32_t size, std::ve
|
||||
Slab *slab = FindSlab(addr);
|
||||
bool found = false;
|
||||
while (slab != nullptr && slab->start < end) {
|
||||
results.push_back({ flags, slab->start, slab->end - slab->start, slab->pc, slab->tag, slab->allocated });
|
||||
found = true;
|
||||
if (slab->pc != 0 || !slab->tag.empty()) {
|
||||
results.push_back({ flags, slab->start, slab->end - slab->start, slab->pc, slab->tag, slab->allocated });
|
||||
found = true;
|
||||
}
|
||||
slab = slab->next;
|
||||
}
|
||||
return found;
|
||||
@ -378,6 +380,21 @@ std::vector<MemBlockInfo> FindMemInfo(uint32_t start, uint32_t size) {
|
||||
return results;
|
||||
}
|
||||
|
||||
std::vector<MemBlockInfo> FindMemInfoByFlag(MemBlockFlags flags, uint32_t start, uint32_t size) {
|
||||
FlushPendingMemInfo();
|
||||
|
||||
std::vector<MemBlockInfo> results;
|
||||
if (flags & MemBlockFlags::ALLOC)
|
||||
allocMap.Find(MemBlockFlags::ALLOC, start, size, results);
|
||||
if (flags & MemBlockFlags::SUB_ALLOC)
|
||||
suballocMap.Find(MemBlockFlags::SUB_ALLOC, start, size, results);
|
||||
if (flags & MemBlockFlags::WRITE)
|
||||
writeMap.Find(MemBlockFlags::WRITE, start, size, results);
|
||||
if (flags & MemBlockFlags::TEXTURE)
|
||||
textureMap.Find(MemBlockFlags::TEXTURE, start, size, results);
|
||||
return results;
|
||||
}
|
||||
|
||||
void MemBlockInfoInit() {
|
||||
pendingNotifies.reserve(MAX_PENDING_NOTIFIES);
|
||||
}
|
||||
|
@ -49,6 +49,7 @@ void NotifyMemInfo(MemBlockFlags flags, uint32_t start, uint32_t size, const std
|
||||
void NotifyMemInfoPC(MemBlockFlags flags, uint32_t start, uint32_t size, uint32_t pc, const std::string &tag);
|
||||
|
||||
std::vector<MemBlockInfo> FindMemInfo(uint32_t start, uint32_t size);
|
||||
std::vector<MemBlockInfo> FindMemInfoByFlag(MemBlockFlags flags, uint32_t start, uint32_t size);
|
||||
|
||||
void MemBlockInfoInit();
|
||||
void MemBlockInfoShutdown();
|
||||
|
Loading…
Reference in New Issue
Block a user