From 731bca5c31f3507424a391fecf081be1a6c6717d Mon Sep 17 00:00:00 2001 From: blasty Date: Fri, 24 Jul 2026 15:33:17 +0200 Subject: xrefs: show fine-grained kind (call/jump/read/write/offset) in the dialog ida-pro-mcp's xref_query only classifies xrefs as code/data (xr.iscode). Add an injected `xref_types` tool (server/patch_server.py) that mirrors xref_query's query/envelope shape but derives a fine `kind` from the IDA xref type: call/jump/flow for code (fl_CF/CN/JF/JN/F), read/write/offset/text/info for data (dr_R/W/O/T/I). The worker self-injects it on startup like the other custom tools. * domain: Xref gains a `kind` field; _parse_xrefs reads it; xrefs_to() now calls xref_types (falling back to xref_query if absent). xrefs_from is unchanged. * app: the `x` dialog shows the kind as an aligned column after the address (`000034F4 read sub_34F0+0x4`). * rpc: the structured xrefs_to read carries `kind` too. Verified live over the worker/RPC harness on targets/echo: sub_2C00 callers -> call; __progname -> offset (GOT), read (sub_34F0), write (sub_3500); stdout -> read/offset. --- idatui/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'idatui/app.py') diff --git a/idatui/app.py b/idatui/app.py index ce07cd0..07325a1 100644 --- a/idatui/app.py +++ b/idatui/app.py @@ -3164,7 +3164,8 @@ class IdaTui(App): # not inside a function: name the section it lives in (a GOT/reloc # data slot or a loose thunk) instead of a bare '?'. loc = self.program.section_of(x.frm) or "" - items.append((x.frm, f"{x.frm:08X} {loc:<26} [{x.type}]")) + kind = x.kind or x.type or "?" + items.append((x.frm, f"{x.frm:08X} {kind:<6} {loc}")) preselect = self._xref_preselect(xr, here_ea, here_end) self.app.call_from_thread(self._present_xrefs, label, items, focus, preselect) -- cgit v1.3.1-sl0p