From 737744644f0cc45d73e34731046db51326f3ffdd Mon Sep 17 00:00:00 2001 From: blasty Date: Thu, 9 Jul 2026 19:47:38 +0200 Subject: fix: xref-select navigated to the wrong place (ordinary-flow contamination) xrefs data doesn't distinguish a call/jump from ordinary flow (both type=code), so _xrefs_disasm's 'first code from-xref' subject picked the fall-through to the NEXT instruction on a plain line. Its only xref is the flow edge back, so selecting it jumped to the current function at line 0 instead of a real caller. Drop the from-xref subject entirely: use the symbol under the cursor if any, else the current address (xrefs-to a function entry == its callers). Now selecting an xref lands on the exact referencing function AND line. pilot suite 59/59. --- idatui/app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'idatui') diff --git a/idatui/app.py b/idatui/app.py index 702f59a..76f9943 100644 --- a/idatui/app.py +++ b/idatui/app.py @@ -1380,8 +1380,11 @@ class IdaTui(App): except Exception: # noqa: BLE001 subj = None if subj is None: - frm = self.program.xrefs_from(ea) - subj = next((x.to for x in frm if x.type == "code" and x.to), ea) + # xrefs to the current address itself. (Do NOT chase a from-xref: on + # a plain instruction the only code from-xref is the ordinary-flow + # fall-through to the next instruction, which would point xrefs at + # the wrong place. At a function entry, xrefs-to == the callers.) + subj = ea self._xrefs_present(subj) @work(thread=True, group="xrefs") -- cgit v1.3.1-sl0p