static
| 2074 | |
| 2075 | // static |
| 2076 | std::optional<KernelCacheMetadata> KernelCacheMetadata::LoadFromView(BinaryView* view) |
| 2077 | { |
| 2078 | Ref<Metadata> viewMetadata = view->QueryMetadata(Tag); |
| 2079 | if (!viewMetadata) |
| 2080 | return std::nullopt; |
| 2081 | |
| 2082 | auto cacheInfo = KernelCache::CacheInfo::LoadFromString(viewMetadata->GetString()); |
| 2083 | if (!cacheInfo) |
| 2084 | return std::nullopt; |
| 2085 | |
| 2086 | auto modifiedState = KernelCache::ModifiedState::LoadAll(view, *cacheInfo); |
| 2087 | return KernelCacheMetadata(std::move(*cacheInfo), std::move(modifiedState)); |
| 2088 | } |
| 2089 | |
| 2090 | std::string KernelCacheMetadata::InstallNameForImageBaseAddress(uint64_t baseAddress) const |
| 2091 | { |
nothing calls this directly
no test coverage detected