diff options
| author | blasty <blasty@local> | 2026-08-07 13:34:03 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-08-07 13:34:03 +0200 |
| commit | ddeb7afea4553e73a7c1decd78fde968e40d186e (patch) | |
| tree | d832b05bd2f575b09c4a8dfa88247ef091383084 /uv.lock | |
| parent | codemode: port the xref tools' real contract, order included (diff) | |
| download | ida-tui-ddeb7afea4553e73a7c1decd78fde968e40d186e.tar.gz ida-tui-ddeb7afea4553e73a7c1decd78fde968e40d186e.tar.xz ida-tui-ddeb7afea4553e73a7c1decd78fde968e40d186e.zip | |
codemode: carry over the listing + operand-format tools, and stop reshipping them
This closes the five operations the port was missing and restores the listing's
own tooling instead of a re-implementation of it.
idatui/remote_tools.py is the port's IDAPython island: `heads` (the continuous
listing) and `op_format`/`pc_nums`/`pc_num_format` (`o`/`O`), extracted verbatim
from the BODY that server/patch_server.py used to inject. They are real, diffable
source shipped to the database process as text, not string literals, because this
is the most performance-tuned and behaviour-sensitive code in the project.
Why carry `heads` over rather than keep the port's version: the port's rewrite
emitted no per-operand extents ("ops"), so no keypress could show which literal
it would reformat (opfmt_highlight had no two-operand row to find); it had no
digest/`expect` support, so every page was re-sent after any edit; and its span
walk was the per-character loop ours had already been rewritten out of. It also
dropped struct-member expansion sizing and the func banner/label rows' exact
shapes.
The library is installed ONCE per database process (sys.modules, keyed by a hash
of the source) and then called by name. Code Mode's execute_python builds a fresh
namespace per call, so a library exec'd inline is rebuilt every time and its
module-level caches thrown away -- the per-line render lru_cache in particular,
which the perf work sized to 65536 entries. Installing it once took `heads`
count=200 from 181ms to 92ms; the cache reports 211 hits on a second call where
it previously reported none. (Extraction footgun recorded: ast FunctionDef.lineno
points at `def`, not at the decorators, so a naive slice silently drops
@lru_cache.)
Also ported: flowchart, survey_binary, and the xref contract.
Live pilot suite on targets/echo: 301 passed, 0 failed -- identical to master.
Known, quantified, and NOT fixed here: Code Mode's transport is much slower than
the unix-socket worker for the listing's paging. heads count=200 is 2.6ms on
master vs 92ms here, count=500 is 6.3ms vs 214ms. Roughly half of that is
to_jsonable + HTTP framing per call and is inherent to the architecture; the
empty round trip alone is 2ms. The digest/`expect` path (unchanged pages) is the
main mitigation and is restored.
Diffstat (limited to 'uv.lock')
0 files changed, 0 insertions, 0 deletions
