diff options
| author | blasty <blasty@local> | 2026-07-09 19:47:38 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-09 19:47:38 +0200 |
| commit | 737744644f0cc45d73e34731046db51326f3ffdd (patch) | |
| tree | 5755fe79416af315c16b93502570a5c5fd1afe44 /idatui | |
| parent | docs: TEXTUAL_NOTES.md — Textual pitfalls, app patterns, testing gotchas (diff) | |
| download | ida-tui-737744644f0cc45d73e34731046db51326f3ffdd.tar.gz ida-tui-737744644f0cc45d73e34731046db51326f3ffdd.tar.xz ida-tui-737744644f0cc45d73e34731046db51326f3ffdd.zip | |
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.
Diffstat (limited to 'idatui')
| -rw-r--r-- | idatui/app.py | 7 |
1 files changed, 5 insertions, 2 deletions
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") |
