From ead2125f041649024ede36d0b4eb8e4c4c466e32 Mon Sep 17 00:00:00 2001 From: blasty Date: Fri, 10 Jul 2026 16:01:54 +0200 Subject: app: drop the Header (keep the Footer); rpc: function-scope xrefs_from MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The clock/title Header added noise (and made screen() non-deterministic); remove it from the app itself — the Footer stays. Layout shifts up a row; scenario suite still 101 green. xrefs_from on a function was near-useless: the server's xrefs_from is address-scoped, so passing the entry ea only returned the fall-through from the first instruction. For a function target it now returns whole-body references from the decompiler (callees + string/data refs: {to,name,string,is_func,type}); an explicit 0xADDR stays address-scoped. Verified live: xrefs_from main now lists setlocale/getopt_long/sub_* etc. rpc_smoke: 25 green. --- tests/rpc_smoke.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/rpc_smoke.py b/tests/rpc_smoke.py index 5d24978..fe2b79b 100644 --- a/tests/rpc_smoke.py +++ b/tests/rpc_smoke.py @@ -186,6 +186,20 @@ async def run(db): callee is not None and all("frm" in x for x in callee[1]), "no referenced function found" if callee is None else "") + # xrefs_from a function is whole-body (decomp refs), not just the entry: + # find a function that actually calls something. + caller = next((f["name"] for f in funcs if f["name"] == "main"), None) + xf = [] + for name in ([caller] if caller else []) + [f["name"] for f in funcs]: + xf = (await c.call("xrefs_from", target=name)).get("result", []) + if any(x.get("is_func") for x in xf): + caller = name + break + check("xrefs_from a function lists whole-body callees", + isinstance(xf, list) and len(xf) > 1 + and any(x.get("is_func") for x in xf) and all("to" in x for x in xf), + f"caller={caller} n={len(xf)}") + # --- modal select: open xrefs on the callee, pick the first site --- # if callee is not None: f, xr = callee -- cgit v1.3.1-sl0p