diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-10 00:53:06 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-04-10 14:38:09 -0400 |
| commit | 86019f825db516d8d5349c271f702dfe69b5fead (patch) | |
| tree | ec91007fa0c857bfd54bb3d1d78ff55daf083928 /view/sharedcache/core/SharedCacheView.h | |
| parent | b00d315524610d8c66af27619e87648bd5d63942 (diff) | |
[SharedCache] Make the shared cache file lookup more straightforward
We already had separated this part out into the `CacheProcessor` but its more like a builder than anything, so this refactors that out into a `SharedCacheBuilder`.
- Separate out the `CacheProcessor` and simplify its implementation
- Move more implementation specific stuff to the shared cache view
- Prepare for more validation of the shared cache to detect irregular or incomplete shared cache information
- Deduplicate a lot of file vs. project file lookup stuff
- Stop copying all images when getting the number of images to log
- Allow user to select another directory to scan for shared cache files, might make this a warning instead to prevent users from relying on this behavior
We will likely follow this commit up soon with better open behavior, maybe open with options can specify a list of cache entry files? Shouldn't be too much effort aside from making the UI modal for that.
Diffstat (limited to 'view/sharedcache/core/SharedCacheView.h')
| -rw-r--r-- | view/sharedcache/core/SharedCacheView.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/view/sharedcache/core/SharedCacheView.h b/view/sharedcache/core/SharedCacheView.h index 1ead0b33..0ae43368 100644 --- a/view/sharedcache/core/SharedCacheView.h +++ b/view/sharedcache/core/SharedCacheView.h @@ -11,6 +11,7 @@ class SharedCacheView : public BinaryNinja::BinaryView { bool m_parseOnly; + BinaryNinja::Ref<BinaryNinja::Logger> m_logger; public: SharedCacheView(const std::string& typeName, BinaryView* data, bool parseOnly = false); @@ -18,6 +19,9 @@ public: ~SharedCacheView() override = default; bool Init() override; + + // Initialized the shared cache controller for this view. This is what allows us to load images and regions. + bool InitController(); }; |
