From 2d9ee753da26250eb577f5a4b4792df1220d2a76 Mon Sep 17 00:00:00 2001 From: blasty Date: Thu, 9 Jul 2026 19:31:03 +0200 Subject: fix: decomp follow fails on a just-renamed symbol (stale name) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Right after a rename there's a window where the pseudocode cursor word is still the OLD name while the symbol table already has the new one, so name-based decomp follow (refs / resolve / _ref_on_line) all miss -> 'nothing to follow'. Disasm never hit this because it falls back to an address xref. Add the same address-based fallback to _follow_decomp: parse the line's /*0xEA*/ marker and follow a code xref from that statement — immune to a stale name. Verified: with the old token 'sub_53D20' (renamed away) it still follows to the right address. pilot suite 58/58. --- idatui/app.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'idatui') diff --git a/idatui/app.py b/idatui/app.py index b5bb5f2..702f59a 100644 --- a/idatui/app.py +++ b/idatui/app.py @@ -1346,6 +1346,14 @@ class IdaTui(App): addr = None if addr is None: addr = self._ref_on_line(line) + if addr is None: + # Address-based fallback: use the line's /*0xEA*/ marker and follow a + # code xref from that statement. Immune to a stale name (e.g. right + # after a rename, before the pseudocode text catches up). + m = re.search(r"/\*\s*0x([0-9A-Fa-f]+)\s*\*/", line or "") + if m: + xr = self.program.xrefs_from(int(m.group(1), 16)) + addr = next((x.to for x in xr if x.type == "code" and x.to), None) if addr is None: self.app.call_from_thread(self._status, "nothing to follow on this line") return -- cgit v1.3.1-sl0p