diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-08 13:17:30 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-04-08 13:21:48 -0400 |
| commit | a45466fc3227c615c72e77eb7368d7e83220b325 (patch) | |
| tree | 7a1060a6e98a0faa6fe81324553f65f4cafdbfed /view/sharedcache/core/SharedCacheController.cpp | |
| parent | a6c5c22f08032374481aa060b59ef3492d124200 (diff) | |
Remove notion of image name from objective-c processor
This made the macho objective-c processor aware of images and was passed around everywhere, instead we have an overridable section getter that gives the control over the section retrieval to the derived processor.
In the case of shared cache this means we can store the image to be processed and then use the header to locate the relevant sections.
Fixes: https://github.com/Vector35/binaryninja-api/issues/6594
Diffstat (limited to 'view/sharedcache/core/SharedCacheController.cpp')
| -rw-r--r-- | view/sharedcache/core/SharedCacheController.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/view/sharedcache/core/SharedCacheController.cpp b/view/sharedcache/core/SharedCacheController.cpp index 13afb476..8d036b4a 100644 --- a/view/sharedcache/core/SharedCacheController.cpp +++ b/view/sharedcache/core/SharedCacheController.cpp @@ -215,16 +215,14 @@ bool SharedCacheController::ApplyImage(BinaryView& view, const CacheImage& image machoProcessor.ApplyHeader(*image.header); view.SetFunctionAnalysisUpdateDisabled(prevDisabledState); - // TODO: Passing in an image name here is weird considering this is shared with the MACHO view. - // TODO: We should abstract out the "image" into an objc image type that represents what is required, which ig is the name? // Load objective-c information. - auto objcProcessor = DSCObjC::SharedCacheObjCProcessor(&view, false); + auto objcProcessor = DSCObjC::SharedCacheObjCProcessor(&view, false, image.headerAddress); try { if (m_processObjC) - objcProcessor.ProcessObjCData(image.GetName()); + objcProcessor.ProcessObjCData(); if (m_processCFStrings) - objcProcessor.ProcessCFStrings(image.GetName()); + objcProcessor.ProcessCFStrings(); } catch (std::exception& e) { |
