diff options
| author | blasty <peter@haxx.in> | 2026-08-01 17:22:51 +0200 |
|---|---|---|
| committer | blasty <peter@haxx.in> | 2026-08-01 17:22:51 +0200 |
| commit | f24022a3cc1287334b1c97c2346f3110dfbffde4 (patch) | |
| tree | 09864842779d098f589e02963b16cf44a82cd3d3 /idatui/rpc.py | |
| parent | rpc: make a raw firmware image drivable (load options, define, bulk symbols) (diff) | |
| download | ida-tui-f24022a3cc1287334b1c97c2346f3110dfbffde4.tar.gz ida-tui-f24022a3cc1287334b1c97c2346f3110dfbffde4.tar.xz ida-tui-f24022a3cc1287334b1c97c2346f3110dfbffde4.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/rpc.py')
| -rw-r--r-- | idatui/rpc.py | 10 |
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 |
