diff options
| author | kat <kat@vector35.com> | 2025-06-06 12:48:09 -0400 |
|---|---|---|
| committer | kat <kat@vector35.com> | 2025-06-06 12:48:09 -0400 |
| commit | 380b645519c41b2ec48877145c5db63c40cb224d (patch) | |
| tree | b2551fbfb97b9f794cd620c47f2ce2e477fb078f | |
| parent | ddc3075e265aee39ad5b74836d2d452bdeea630c (diff) | |
Objective-C Processor: Remove vestigial code tracking whether view was backed by a database
| -rw-r--r-- | objectivec/objc.cpp | 4 | ||||
| -rw-r--r-- | objectivec/objc.h | 3 | ||||
| -rw-r--r-- | view/macho/machoview.cpp | 2 | ||||
| -rw-r--r-- | view/macho/objc.cpp | 4 | ||||
| -rw-r--r-- | view/macho/objc.h | 2 | ||||
| -rw-r--r-- | view/sharedcache/core/ObjC.cpp | 4 | ||||
| -rw-r--r-- | view/sharedcache/core/ObjC.h | 2 | ||||
| -rw-r--r-- | view/sharedcache/core/SharedCacheController.cpp | 2 |
8 files changed, 11 insertions, 12 deletions
diff --git a/objectivec/objc.cpp b/objectivec/objc.cpp index 014d8057..da531e80 100644 --- a/objectivec/objc.cpp +++ b/objectivec/objc.cpp @@ -1308,8 +1308,8 @@ uint64_t ObjCProcessor::ReadPointerAccountingForRelocations(ObjCReader* reader) } -ObjCProcessor::ObjCProcessor(BinaryView* data, const char* loggerName, bool isBackedByDatabase, bool skipClassBaseProtocols) : - m_isBackedByDatabase(isBackedByDatabase), m_skipClassBaseProtocols(skipClassBaseProtocols), m_data(data) +ObjCProcessor::ObjCProcessor(BinaryView* data, const char* loggerName, bool skipClassBaseProtocols) : + m_skipClassBaseProtocols(skipClassBaseProtocols), m_data(data) { m_logger = m_data->CreateLogger(loggerName); } diff --git a/objectivec/objc.h b/objectivec/objc.h index 1cff9401..a8769ba6 100644 --- a/objectivec/objc.h +++ b/objectivec/objc.h @@ -276,7 +276,6 @@ namespace BinaryNinja { QualifiedName ivarList; } m_typeNames; - bool m_isBackedByDatabase; // TODO(WeiN76LQh): this is to avoid a bug with defining a classes protocol list in the DSC plugin. Remove once fixed bool m_skipClassBaseProtocols; @@ -332,7 +331,7 @@ namespace BinaryNinja { public: virtual ~ObjCProcessor() = default; - ObjCProcessor(BinaryView* data, const char* loggerName, bool isBackedByDatabase, bool skipClassBaseProtocols = false); + ObjCProcessor(BinaryView* data, const char* loggerName, bool skipClassBaseProtocols = false); void ProcessObjCData(); void ProcessCFStrings(); void AddRelocatedPointer(uint64_t location, uint64_t rewrite); diff --git a/view/macho/machoview.cpp b/view/macho/machoview.cpp index dde5fa86..26839c93 100644 --- a/view/macho/machoview.cpp +++ b/view/macho/machoview.cpp @@ -1854,7 +1854,7 @@ bool MachoView::InitializeHeader(MachOHeader& header, bool isMainHeader, uint64_ parseCFStrings = false; if (parseObjCStructs || parseCFStrings) { - m_objcProcessor = new MachoObjCProcessor(this, m_backedByDatabase); + m_objcProcessor = new MachoObjCProcessor(this); } if (parseObjCStructs) { diff --git a/view/macho/objc.cpp b/view/macho/objc.cpp index 6df20816..10fa34e9 100644 --- a/view/macho/objc.cpp +++ b/view/macho/objc.cpp @@ -87,7 +87,7 @@ bool MachoObjCProcessor::ViewHasObjCMetadata(BinaryView* data) || data->GetSectionByName("__objc_protolist")); } -MachoObjCProcessor::MachoObjCProcessor(BinaryView* data, bool isBackedByDatabase) : - ObjCProcessor(data, "macho.objc", isBackedByDatabase) +MachoObjCProcessor::MachoObjCProcessor(BinaryView* data) : + ObjCProcessor(data, "macho.objc") { } diff --git a/view/macho/objc.h b/view/macho/objc.h index d64923cf..c621d7d1 100644 --- a/view/macho/objc.h +++ b/view/macho/objc.h @@ -31,7 +31,7 @@ namespace BinaryNinja { std::shared_ptr<ObjCReader> GetReader() override; public: - MachoObjCProcessor(BinaryView* data, bool isBackedByDatabase); + MachoObjCProcessor(BinaryView* data); static bool ViewHasObjCMetadata(BinaryView* data); }; diff --git a/view/sharedcache/core/ObjC.cpp b/view/sharedcache/core/ObjC.cpp index 98fc42bb..dc3012a5 100644 --- a/view/sharedcache/core/ObjC.cpp +++ b/view/sharedcache/core/ObjC.cpp @@ -187,8 +187,8 @@ Ref<Section> SharedCacheObjCProcessor::GetSectionWithName(const char *sectionNam return nullptr; } -SharedCacheObjCProcessor::SharedCacheObjCProcessor(BinaryView *data, bool isBackedByDatabase, uint64_t imageAddress) - : ObjCProcessor(data, "SharedCache.ObjC", isBackedByDatabase, true) +SharedCacheObjCProcessor::SharedCacheObjCProcessor(BinaryView *data, uint64_t imageAddress) + : ObjCProcessor(data, "SharedCache.ObjC", true) { m_imageAddress = imageAddress; } diff --git a/view/sharedcache/core/ObjC.h b/view/sharedcache/core/ObjC.h index f44323d6..a30b9de4 100644 --- a/view/sharedcache/core/ObjC.h +++ b/view/sharedcache/core/ObjC.h @@ -69,7 +69,7 @@ namespace DSCObjC { BinaryNinja::Ref<BinaryNinja::Section> GetSectionWithName(const char *sectionName) override; public: - SharedCacheObjCProcessor(BinaryNinja::BinaryView* data, bool isBackedByDatabase, uint64_t imageAddress); + SharedCacheObjCProcessor(BinaryNinja::BinaryView* data, uint64_t imageAddress); uint64_t GetObjCRelativeMethodBaseAddress(BinaryNinja::ObjCReader* reader) override; }; diff --git a/view/sharedcache/core/SharedCacheController.cpp b/view/sharedcache/core/SharedCacheController.cpp index ff688f3c..5a5320c3 100644 --- a/view/sharedcache/core/SharedCacheController.cpp +++ b/view/sharedcache/core/SharedCacheController.cpp @@ -227,7 +227,7 @@ bool SharedCacheController::ApplyImage(BinaryView& view, const CacheImage& image view.SetFunctionAnalysisUpdateDisabled(prevDisabledState); // Load objective-c information. - auto objcProcessor = DSCObjC::SharedCacheObjCProcessor(&view, false, image.headerAddress); + auto objcProcessor = DSCObjC::SharedCacheObjCProcessor(&view, image.headerAddress); try { if (m_processObjC) |
