mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 22:47:03 +00:00
[rpcsx-os] vm: implement virtual query
This commit is contained in:
parent
1743d6ebf2
commit
288f7fcc7a
8 changed files with 278 additions and 124 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue