From 86bf8efada5c48ca339b4de3bcfed22b97e0e0bf Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 1 Apr 2025 14:50:37 -0400 Subject: [SharedCache] Add python get_symbol_at --- view/sharedcache/api/python/sharedcache.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'view/sharedcache/api') diff --git a/view/sharedcache/api/python/sharedcache.py b/view/sharedcache/api/python/sharedcache.py index 83be388b..e250b95b 100644 --- a/view/sharedcache/api/python/sharedcache.py +++ b/view/sharedcache/api/python/sharedcache.py @@ -206,6 +206,14 @@ class SharedCacheController: BNFreeStringList(value, count) return result + def get_symbol_at(self, address: int) -> Optional[CacheSymbol]: + api_symbol = sccore.BNSharedCacheSymbol() + if not sccore.BNSharedCacheControllerGetSymbolAt(self.handle, address, api_symbol): + return None + symbol = symbol_from_api(api_symbol) + sccore.BNSharedCacheFreeSymbol(api_symbol) + return symbol + @property def regions(self) -> [CacheRegion]: count = ctypes.c_ulonglong() -- cgit v1.3.1