diff options
| author | blasty <blasty@local> | 2026-07-23 15:51:31 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-23 15:51:31 +0200 |
| commit | 66c960cb00a4c544b35e57877b87b2d3cc37686b (patch) | |
| tree | 9e5b45c4d696dfb09ea08aff252a7cafce58ab20 /tests | |
| parent | listing: render opcode bytes (shared engine with disasm) — M4/UX step 1 (diff) | |
| download | ida-tui-66c960cb00a4c544b35e57877b87b2d3cc37686b.tar.gz ida-tui-66c960cb00a4c544b35e57877b87b2d3cc37686b.tar.xz ida-tui-66c960cb00a4c544b35e57877b87b2d3cc37686b.zip | |
listing: F5/Tab decompiles the function under the cursor (IDA-style) — step 2
In the continuous listing, F5 (or Tab) decompiles the defined function the
cursor is inside; F5/Tab again returns to the linear listing exactly where you
left. Not-in-a-function -> a message; decompile failure falls back to the
listing (not the bounded disasm). Listing position is snapshotted so the
round-trip is lossless.
Verified: continuous_view F5 round-trip + view_toggle/disasm_nav/follow_xrefs/
region_define/listing_view 45/0.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_scenarios.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_scenarios.py b/tests/test_scenarios.py index b441a2c..af858cf 100644 --- a/tests/test_scenarios.py +++ b/tests/test_scenarios.py @@ -1639,6 +1639,24 @@ async def s_continuous_view(c: Ctx): cidx is not None and c.lst.model.get(cidx).raw and c.lst._op_field(c.lst.model.get(cidx)).strip() != "", f"raw={c.lst.model.get(cidx).raw if cidx is not None else None!r}") + # F5 in the continuous listing (cursor at the origin function) -> decompiler + c.lst.focus() + await c.press("f5") + landed = await c.wait( + lambda: (app._active == "decomp" and c.dec.loaded_ea == fn_ea) + or (app._active == "listing" and "failed" in c.status().lower()), 25) + if app._active == "decomp": + c.check("F5 in the listing decompiles the function under the cursor", + c.dec.loaded_ea == fn_ea, f"loaded={c.dec.loaded_ea}") + await c.press("f5") + await c.wait(lambda: app._active == "listing" and app._cur.is_region, 25) + c.check("F5 in the decompiler returns to the continuous listing", + app._active == "listing" and app._cur.is_region + and c.lst._cursor_ea() == fn_ea, + f"active={app._active} cur_ea={c.lst._cursor_ea()}") + else: + c.check("F5 on an undecompilable function falls back to the listing", + app._active == "listing", f"active={app._active}") # --------------------------------------------------------------------------- # |
