From 01fc7da4f3198f922cd4859b8cefb93119f70a9a Mon Sep 17 00:00:00 2001 From: blasty Date: Thu, 9 Jul 2026 15:06:31 +0200 Subject: fix: decompiler follow/xrefs of a name not listed in refs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _follow_decomp / _xrefs_decomp only matched the pseudocode ref list, so a function name under the cursor that wasn't in refs (self-reference, or refs truncated on big functions) did nothing — while disasm worked because it also resolves the symbol. Both decomp paths now fall back to program.resolve(word) like disasm does. pilot suite 45/45. --- idatui/app.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'idatui') diff --git a/idatui/app.py b/idatui/app.py index 45a5c82..b030e69 100644 --- a/idatui/app.py +++ b/idatui/app.py @@ -1256,6 +1256,13 @@ class IdaTui(App): addr = None if word: # the ref whose name is exactly the token under the cursor addr = next((r.addr for r in dec.refs if r.name == word), None) + # A named function under the cursor may not be listed in refs + # (e.g. self-reference, or refs truncated) — resolve it directly. + if addr is None and self._looks_like_symbol(word): + try: + addr = self.program.resolve(word) + except Exception: # noqa: BLE001 + addr = None if addr is None: addr = self._ref_on_line(line) if addr is None: @@ -1294,6 +1301,11 @@ class IdaTui(App): if self._cur is not None and word: dec = self.program.decompile(self._cur.ea) subj = next((r.addr for r in dec.refs if r.name == word), None) + if subj is None and self._looks_like_symbol(word): + try: + subj = self.program.resolve(word) + except Exception: # noqa: BLE001 + subj = None if subj is None: subj = self._ref_on_line(line) or (self._cur.ea if self._cur else None) if subj is not None: -- cgit v1.3.1-sl0p