From 1f0be2385be2c796152e12ffebc229f10e3ffc28 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Sun, 24 Nov 2024 16:55:39 -0800 Subject: [SharedCache] Cache type libraries in the view-specific state They're surprisingly expensive to look up. --- view/sharedcache/core/SharedCache.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'view/sharedcache/core/SharedCache.h') diff --git a/view/sharedcache/core/SharedCache.h b/view/sharedcache/core/SharedCache.h index 7b198305..1dcc3033 100644 --- a/view/sharedcache/core/SharedCache.h +++ b/view/sharedcache/core/SharedCache.h @@ -603,6 +603,7 @@ namespace SharedCacheCore { explicit SharedCache(BinaryNinja::Ref rawView); virtual ~SharedCache(); +private: std::optional LoadHeaderForAddress( std::shared_ptr vm, uint64_t address, std::string installName); void InitializeHeader( @@ -612,6 +613,8 @@ namespace SharedCacheCore { std::vector> ParseExportTrie( std::shared_ptr linkeditFile, SharedCacheMachOHeader header); + Ref TypeLibraryForImage(const std::string& installName); + const State& State() const { return *m_state; } struct State& MutableState() { AssertMutable(); return *m_state; } -- cgit v1.3.1