MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / Load

Method Load

view/kernelcache/core/KernelCache.cpp:2644–2663  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

2642
2643// static
2644std::optional<KernelCache::CacheInfo> KernelCache::CacheInfo::Load(DeserializationContext& context)
2645{
2646 if (!context.doc.HasMember("metadataVersion"))
2647 {
2648 LogError("Shared Cache metadata version missing");
2649 return std::nullopt;
2650 }
2651
2652 if (context.doc["metadataVersion"].GetUint() != METADATA_VERSION)
2653 {
2654 LogError("Shared Cache metadata version mismatch");
2655 return std::nullopt;
2656 }
2657
2658 CacheInfo cacheInfo;
2659 cacheInfo.MSL(images);
2660 cacheInfo.MSL(imageStarts);
2661 cacheInfo.MSL_CAST(cacheFormat, uint8_t, KernelCacheFormat);
2662 return cacheInfo;
2663}
2664void State::Store(SerializationContext& context, std::optional<KCViewState> viewState) const
2665{
2666 MSS(loadedImages);

Callers

nothing calls this directly

Calls 1

HasMemberMethod · 0.80

Tested by

no test coverage detected