diff options
| author | blasty <blasty@local> | 2026-07-09 15:44:11 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-09 15:44:11 +0200 |
| commit | 986abcaf21ee2ebf4f5b48f7fc5b05833fa55d34 (patch) | |
| tree | e0e6af2997dedb3c509d768e8add4efd54719e07 /tests | |
| parent | fix input visibility (search/rename) + refresh stale names across history (diff) | |
| download | ida-tui-986abcaf21ee2ebf4f5b48f7fc5b05833fa55d34.tar.gz ida-tui-986abcaf21ee2ebf4f5b48f7fc5b05833fa55d34.tar.xz ida-tui-986abcaf21ee2ebf4f5b48f7fc5b05833fa55d34.zip | |
fix: pseudocode names not refreshing across history after rename
force_recompile takes 'items=[{addr}]', not 'addr' — my call raised and was
swallowed, so the Hex-Rays cache was never cleared and a caller's cached
pseudocode kept showing the old callee name on 'back' (disasm refreshed because
its names are live). Use the correct params. History test now also caches and
verifies the caller's pseudocode. pilot suite 52/52.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_tui.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/test_tui.py b/tests/test_tui.py index 3b45ef9..18194bf 100644 --- a/tests/test_tui.py +++ b/tests/test_tui.py @@ -533,6 +533,11 @@ async def run(db): table.move_cursor(row=biggest_i) await pilot.press("enter") await wait_until(pilot, lambda: dis.total > 0, timeout=20) + bea = app._cur.ea + # cache the caller's pseudocode too, so the stale-decomp path is exercised + await pilot.press("tab") + await wait_until(pilot, lambda: dec.loaded_ea == bea, timeout=20) + await pilot.press("tab") dis.focus() await pilot.pause(0.2) hrow = hsym = None @@ -587,8 +592,15 @@ async def run(db): dis.model.lines(hrow, 4, prefetch=False) await pilot.pause(0.2) hline = dis._line_plain(hrow) - check("caller shows renamed callee after 'back' (cache refresh)", + check("caller disasm shows renamed callee after 'back'", hline is not None and hnew in hline, f"line={hline!r}") + # and the caller's cached pseudocode must refresh too + await pilot.press("tab") + await wait_until(pilot, lambda: dec.loaded_ea == bea, timeout=25) + await pilot.pause(0.3) + check("caller pseudocode shows renamed callee after 'back'", + any(hnew in tx for tx in dec._texts), + "pseudocode still stale") app.program.client.call( "rename", batch={"func": {"addr": hex(htarget), "name": hsym}}) |
