binsync / libbs

A library for writing plugins in any decompiler: includes API lifting, common data formatting, and GUI abstraction!
BSD 2-Clause "Simplified" License
63 stars 4 forks source link

Cache `binary_base_addr` and detect when it has been changed to clear that cache #78

Closed mahaloz closed 1 month ago

mahaloz commented 3 months ago

In decompilers like Ghidra, getting the base addr every time we need to lift/lower something is expensive: https://github.com/binsync/libbs/blob/ed73d675f1f79d84423253be2c9a218ee3fd3f85/libbs/decompilers/ghidra/interface.py#L190

We can reduce that cost by caching the base addr and detecting that it has changed. It's unclear if this is generically possible in all decompilers yet.

Tasks