[rpcsx-os] vm: implement virtual query

This commit is contained in:
DH 2023-10-17 23:25:06 +03:00
parent 1743d6ebf2
commit 288f7fcc7a
8 changed files with 278 additions and 124 deletions

View file

@ -245,6 +245,26 @@ public:
void clear() { mAreas.clear(); }
iterator lowerBound(std::uint64_t address) {
auto it = mAreas.lower_bound(address);
if (it == mAreas.end()) {
return it;
}
if (it->first == address) {
if (it->second.first == Kind::X) {
++it;
}
} else {
if (it->second.first != Kind::O) {
--it;
}
}
return it;
}
iterator queryArea(std::uint64_t address) {
auto it = mAreas.lower_bound(address);