| 2681 | } |
| 2682 | |
| 2683 | KernelCache::ModifiedState KernelCache::ModifiedState::LoadAll(BinaryNinja::BinaryView *dscView, const CacheInfo& cacheInfo) |
| 2684 | { |
| 2685 | uint64_t stateCount = dscView->GetUIntMetadata(KernelCacheMetadata::ModifiedStateCountTag); |
| 2686 | KernelCache::ModifiedState state; |
| 2687 | for (uint64_t i = 0; i < stateCount; ++i) |
| 2688 | { |
| 2689 | std::string key = KernelCacheMetadata::ModifiedStateTagPrefix + std::to_string(i); |
| 2690 | std::string serialized = dscView->GetStringMetadata(key); |
| 2691 | auto thisState = KernelCache::ModifiedState::LoadFromString(serialized); |
| 2692 | state.Merge(std::move(thisState)); |
| 2693 | } |
| 2694 | return state; |
| 2695 | } |
| 2696 | |
| 2697 | void KernelCache::ModifiedState::Merge(KernelCache::ModifiedState&& newer) |
| 2698 | { |
nothing calls this directly
no test coverage detected