Skip to content

Commit 48f107d

Browse files
committed
[SharedCache] Add python get_symbol_at
1 parent f556b78 commit 48f107d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

view/sharedcache/api/python/sharedcache.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ def get_image_dependencies(self, image: CacheImage) -> [str]:
206206
BNFreeStringList(value, count)
207207
return result
208208

209+
def get_symbol_at(self, address: int) -> Optional[CacheSymbol]:
210+
api_symbol = sccore.BNSharedCacheSymbol()
211+
if not sccore.BNSharedCacheControllerGetSymbolAt(self.handle, address, api_symbol):
212+
return None
213+
symbol = symbol_from_api(api_symbol)
214+
sccore.BNSharedCacheFreeSymbol(api_symbol)
215+
return symbol
216+
209217
@property
210218
def regions(self) -> [CacheRegion]:
211219
count = ctypes.c_ulonglong()

0 commit comments

Comments
 (0)