diff options
| author | blasty <blasty@local> | 2026-07-09 14:44:31 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-09 14:44:31 +0200 |
| commit | 5f6014514edf65dcf249a8ff457bb42409336eef (patch) | |
| tree | 6afe367fa931cb6977ee22f802ed8b9d13453944 /idatui/domain.py | |
| parent | sortable function list: click column headers (addr/name/size) (diff) | |
| download | ida-tui-5f6014514edf65dcf249a8ff457bb42409336eef.tar.gz ida-tui-5f6014514edf65dcf249a8ff457bb42409336eef.tar.xz ida-tui-5f6014514edf65dcf249a8ff457bb42409336eef.zip | |
rename symbol under cursor ('n') + save ('Ctrl+S')
- 'n' on the token under the cursor opens a rename prompt prefilled with the
current name. The symbol is classified and routed to the right rename batch:
* resolves to a function start -> func
* decompiler ref (global/string) -> data
* pseudocode token, not a ref -> local (Hex-Rays lvar)
* disasm var_/arg_ -> stack
tool errors (e.g. name collisions) are surfaced in the status line.
- after a rename: force_recompile + cache invalidation, reload the current views
(preserving cursor), update the renamed function's row in place (avoids racing
the initial stream), and update nav history names.
- 'Ctrl+S' persists the IDB (idb_save); edits mark the session dirty.
- 'n'/'N' search-repeat dropped for 'n'=rename (repeat stays on '/'+Enter / '?').
- verified live: func rename (list + disasm update), local var rename (pseudocode
update), save. pilot suite 44/44; domain 17/17.
Diffstat (limited to 'idatui/domain.py')
| -rw-r--r-- | idatui/domain.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/idatui/domain.py b/idatui/domain.py index 6578932..b219bbe 100644 --- a/idatui/domain.py +++ b/idatui/domain.py @@ -199,6 +199,19 @@ class FunctionIndex: with self._lock: return list(self._funcs) + def update_name(self, addr: int, new_name: str) -> None: + """Reflect a rename in the cached index (Func is frozen -> replace).""" + with self._lock: + old = self._by_addr.get(addr) + if old is None: + return + nf = Func(addr=old.addr, name=new_name, size=old.size) + self._by_addr[addr] = nf + try: + self._funcs[self._funcs.index(old)] = nf + except ValueError: + pass + # --------------------------------------------------------------------------- # # Disassembly model: block-cached windowed listing for ONE function |
