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

Method GetLoadedImages

view/kernelcache/api/kernelcache.cpp:90–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 }
89
90 std::vector<KCImage> KernelCache::GetLoadedImages()
91 {
92 size_t count;
93 auto images = BNKCViewGetLoadedImages(m_object, &count);
94 if (images == nullptr)
95 {
96 return {};
97 }
98 std::vector<KCImage> result;
99 for (size_t i = 0; i < count; i++)
100 {
101 KCImage img;
102 img.name = images[i].name;
103 img.headerFileAddress = images[i].headerFileAddress;
104 for (size_t j = 0; j < images[i].mappingCount; j++)
105 {
106 KCImageMemoryMapping mapping;
107 mapping.name = images[i].mappings[j].name;
108 mapping.vmAddress = images[i].mappings[j].vmAddress;
109 mapping.rawViewOffset = images[i].mappings[j].rawViewOffset;
110 mapping.size = images[i].mappings[j].size;
111 mapping.loaded = images[i].mappings[j].loaded;
112 img.mappings.push_back(mapping);
113 }
114 result.push_back(img);
115 }
116 BNKCViewFreeAllImages(images, count);
117
118 return result;
119 }
120
121 std::vector<KCSymbol> KernelCache::LoadAllSymbolsAndWait()
122 {

Callers

nothing calls this directly

Calls 3

BNKCViewGetLoadedImagesFunction · 0.85
BNKCViewFreeAllImagesFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected