diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-01 14:50:37 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-04-02 05:36:54 -0400 |
| commit | 86bf8efada5c48ca339b4de3bcfed22b97e0e0bf (patch) | |
| tree | 5bad141a4796a6bea12428215d16766b9d1bb7db /view/sharedcache/api/python/sharedcache.py | |
| parent | 2a3c7f754c493b1cff3285b2000e4c19f6cfe5dd (diff) | |
[SharedCache] Add python get_symbol_at
Diffstat (limited to 'view/sharedcache/api/python/sharedcache.py')
| -rw-r--r-- | view/sharedcache/api/python/sharedcache.py | 8 |
1 files changed, 8 insertions, 0 deletions
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() |
