diff options
| author | blasty <blasty@local> | 2026-07-10 16:17:50 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-10 16:17:50 +0200 |
| commit | 33bd85e41221a82a8ee7b71d39eda59d89b78ee7 (patch) | |
| tree | 834cfe94671246b35c9592a38baa372df65ed3f4 /tests/rpc_smoke.py | |
| parent | app: comment on a no-address line -> function comment (was refused) (diff) | |
| download | ida-tui-33bd85e41221a82a8ee7b71d39eda59d89b78ee7.tar.gz ida-tui-33bd85e41221a82a8ee7b71d39eda59d89b78ee7.tar.xz ida-tui-33bd85e41221a82a8ee7b71d39eda59d89b78ee7.zip | |
drive: ergonomic RE helper over the RPC socket (terse text, auto socket)
Driving via rpcclient meant re-exporting the socket every fresh shell,
long invocations, and piping ~every call through python -c to pull one
field or grep pseudocode. idatui.drive fixes that: it auto-resolves the
socket (the single live pane from the registry), prints compact text
instead of JSON, and bundles the common gestures:
where | go | pc <fn> [substr] | dis <fn> [n] | callees/callers <fn> |
names <substr> | rename <old> <new> | mv old=new... | note <fn> <text> |
screen | raw <method> k=v
So 'goto+rename+parse' becomes 'drive rename old new', and 'pseudocode |
python -c grep' becomes 'drive pc fn needle'. rpcclient stays the raw
transport. rpc_smoke drives it end-to-end (29 green).
Diffstat (limited to 'tests/rpc_smoke.py')
| -rw-r--r-- | tests/rpc_smoke.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/rpc_smoke.py b/tests/rpc_smoke.py index fe2b79b..a38162e 100644 --- a/tests/rpc_smoke.py +++ b/tests/rpc_smoke.py @@ -248,6 +248,16 @@ async def run(db): except Exception: # noqa: BLE001 pass + # --- ergonomic driver (idatui.drive) over the same socket ---------- # + # (c is closed now, so the single-driver gate lets drive connect.) + from idatui import drive + loop = asyncio.get_running_loop() + for cmd in (["where"], ["pc", target["name"]], ["callees", target["name"]], + ["names", "sub_", "3"]): + rc = await loop.run_in_executor( + None, lambda a=cmd: drive.main(["--sock", sock, *a])) + check(f"drive {cmd[0]} runs against the socket", rc == 0, f"rc={rc}") + # --- graceful quit (last: it tears the app down) ------------------- # r2, w2 = await asyncio.open_unix_connection(sock) c2 = Conn(r2, w2) |
