summaryrefslogtreecommitdiffstats
path: root/idatui
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-01 17:22:51 +0200
committeruser <user@clank>2026-08-01 17:22:51 +0200
commit384846df7469b1dcc1842b6bdd6ccb0732071058 (patch)
tree67ca5bb960b4d7bc28a802bb1d138587ba838ede /idatui
parentrpc: make a raw firmware image drivable (load options, define, bulk symbols) (diff)
downloadida-tui-384846df7469b1dcc1842b6bdd6ccb0732071058.tar.gz
ida-tui-384846df7469b1dcc1842b6bdd6ccb0732071058.tar.xz
ida-tui-384846df7469b1dcc1842b6bdd6ccb0732071058.zip
rpc: rename_many drops the Hex-Rays cache too
Hex-Rays caches per function and does not notice that a *callee* was renamed; worse, that cache is persisted in the .i64, so a bulk import left pseudocode calling sub_98C0 forever while the listing and every readback said memset -- the exact readback disagreement a driver cannot detect. Batch now calls force_recompile before bumping the local caches. Test extended: decompile, rename via rename_many, read the pseudocode back.
Diffstat (limited to 'idatui')
-rw-r--r--idatui/rpc.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/idatui/rpc.py b/idatui/rpc.py
index c356f12..9a60faa 100644
--- a/idatui/rpc.py
+++ b/idatui/rpc.py
@@ -593,7 +593,15 @@ class RpcServer:
failed = [r for r in (res.get("func") or []) if isinstance(r, dict)
and r.get("error")] if isinstance(res, dict) else []
- # Names live in the IDB, but every cache in front of it is now stale.
+ # Names live in the IDB, but every cache in front of it is now stale --
+ # including Hex-Rays', which is per-function and does NOT notice that a
+ # *callee* was renamed. That cache is persisted in the .i64, so without
+ # this a batch import leaves pseudocode calling sub_98C0 forever while
+ # the listing (and every readback) says memset.
+ try:
+ await asyncio.to_thread(app.program.client.call, "force_recompile")
+ except Exception: # noqa: BLE001 -- older worker without the tool
+ pass
app.program.bump_names()
app.program.invalidate_functions()
app._func_index = None