diff options
| author | user <user@clank> | 2026-08-07 01:55:31 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-07 01:55:31 +0200 |
| commit | cf45e115bcd137020002e84b67da7b00547901b5 (patch) | |
| tree | 3954101322a281db2c2a739d647331fc33414be1 /.auto/diff_spans.py | |
| parent | _idatui_spans: one capturing re.split over the tag pairs instead of finditer+... (diff) | |
| download | ida-tui-cf45e115bcd137020002e84b67da7b00547901b5.tar.gz ida-tui-cf45e115bcd137020002e84b67da7b00547901b5.tar.xz ida-tui-cf45e115bcd137020002e84b67da7b00547901b5.zip | |
Re-apply #5 (lru_cache on the per-line render + Heads built with their opcode bytes already attached) with the graph_minimap scenario's racy SETUP made deterministic: clear _graph_sticky before the second navigation so Space is known to be entering the graph, not leaving it. No assertion changed.
Result: {"status":"keep","total_ms":22980.2,"lg_boot_ms":738.2,"lg_decomp_ms":2401.8,"lg_graph_ms":944.1,"lg_hex_ms":920.6,"lg_index_ms":75.2,"lg_listing_cold_ms":538.5,"lg_listing_warm_ms":411.1,"lg_nav_ms":6813.9,"lg_palette_ms":4.9,"lg_render_ms":221.8,"lg_search_ms":5630.1,"pure_graph_ms":240.7,"sm_boot_ms":537.5,"sm_decomp_ms":595.1,"sm_graph_ms":715.7,"sm_hex_ms":858.8,"sm_index_ms":0,"sm_listing_cold_ms":263.3,"sm_listing_warm_ms":265.3,"sm_nav_ms":335.2,"sm_palette_ms":0.3,"sm_render_ms":271.4,"sm_search_ms":196.5,"fails":0}
Diffstat (limited to '.auto/diff_spans.py')
| -rw-r--r-- | .auto/diff_spans.py | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/.auto/diff_spans.py b/.auto/diff_spans.py index 95721a5..aad4ebc 100644 --- a/.auto/diff_spans.py +++ b/.auto/diff_spans.py @@ -39,11 +39,11 @@ def load_impl(path: str, name: str): mod = importlib.util.module_from_spec(spec) spec.loader.exec_module(mod) # IDA-free at import time body = mod.BODY - a = body.index("#: IDA colour tag -> the semantic kind") - b = body.index("def _idatui_unknown_row") + a = body.index("def _idatui_head_row") + b = body.index("def _idatui_struct_member_rows") g = {"__name__": name} exec(compile(body[a:b], name, "exec"), g) # noqa: S102 - return g["_idatui_spans"] + return g def main() -> int: @@ -59,8 +59,10 @@ def main() -> int: fh.write(subprocess.run( ["git", "-C", ROOT, "show", f"{a.ref}:server/patch_server.py"], capture_output=True, text=True, check=True).stdout) - new = load_impl(os.path.join(ROOT, "server", "patch_server.py"), "new") - old = load_impl(old_path, "old") + gnew = load_impl(os.path.join(ROOT, "server", "patch_server.py"), "new") + gold = load_impl(old_path, "old") + new, old = gnew["_idatui_spans"], gold["_idatui_spans"] + new_row, old_row = gnew["_idatui_head_row"], gold["_idatui_head_row"] binary = os.path.join(ROOT, a.target) tgt = os.path.join(d, os.path.basename(binary)) @@ -89,7 +91,15 @@ def main() -> int: if ra != rb: bad += 1 if bad <= 3: - print(f"MISMATCH @ {ea:#x}\n line={line!r}\n" + print(f"SPAN MISMATCH @ {ea:#x}\n line={line!r}\n" + f" old={ra!r}\n new={rb!r}") + # The whole row, not just the spans: `text`, the spans/text + # agreement guard and the name all moved around too. + ra, rb = old_row(ea), new_row(ea) + if ra != rb: + bad += 1 + if bad <= 3: + print(f"ROW MISMATCH @ {ea:#x}\n" f" old={ra!r}\n new={rb!r}") nxt = ida_bytes.get_item_end(ea) ea = nxt if nxt > ea else ea + 1 |
