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

Method GetImages

view/kernelcache/api/kernelcache.cpp:58–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 }
57
58 std::vector<KCImage> KernelCache::GetImages()
59 {
60 size_t count;
61 BNKCImage* value = BNKCViewGetAllImages(m_object, &count);
62 if (value == nullptr)
63 {
64 return {};
65 }
66
67 std::vector<KCImage> result;
68 for (size_t i = 0; i < count; i++)
69 {
70 KCImage img;
71 img.name = value[i].name;
72 img.headerFileAddress = value[i].headerFileAddress;
73 for (size_t j = 0; j < value[i].mappingCount; j++)
74 {
75 KCImageMemoryMapping mapping;
76 mapping.name = value[i].mappings[j].name;
77 mapping.vmAddress = value[i].mappings[j].vmAddress;
78 mapping.rawViewOffset = value[i].mappings[j].rawViewOffset;
79 mapping.size = value[i].mappings[j].size;
80 mapping.loaded = value[i].mappings[j].loaded;
81 img.mappings.push_back(mapping);
82 }
83 result.push_back(img);
84 }
85
86 BNKCViewFreeAllImages(value, count);
87 return result;
88 }
89
90 std::vector<KCImage> KernelCache::GetLoadedImages()
91 {

Callers 1

initImageTableMethod · 0.45

Calls 3

BNKCViewGetAllImagesFunction · 0.85
BNKCViewFreeAllImagesFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected