diff options
| author | blasty <blasty@local> | 2026-07-23 20:03:39 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-23 20:03:39 +0200 |
| commit | 4dbb9de9117a85b48f16efbf97477fc58b8283fe (patch) | |
| tree | 255fc47da48ff8c33d15cc98d7ea7da09c582081 /idatui/domain.py | |
| parent | unify: the continuous listing is the one code view; deprecate DisasmView (diff) | |
| download | ida-tui-4dbb9de9117a85b48f16efbf97477fc58b8283fe.tar.gz ida-tui-4dbb9de9117a85b48f16efbf97477fc58b8283fe.tar.xz ida-tui-4dbb9de9117a85b48f16efbf97477fc58b8283fe.zip | |
listing: IDA-style function boundary banners in the unified view
Each function gets clear boundary annotations in the continuous listing: a blank
+ '; ==== S U B R O U T I N E ====' separator and a 'name proc near' header
before the entry, and a 'name endp' + rule after the last item. The function
name moves to the proc header (stripped from the inline entry instruction).
Server: heads gains an annotate flag (default off, so DisasmModel/test_domain
stay 1:1 with instructions); when on, _rows_for emits kind=sep/funchdr rows at
function starts/ends. ListingModel requests annotate=true and does NOT index
banner rows by ea, so goto/xref/follow land on real code. ListingView renders
sep (dim) and funchdr (bold gold); new _S_SEP/_S_FUNCHDR styles.
Verified: func_banners 5/0; region_define/listing_view/listing_name_addr/
listing_struct_expand/continuous_view/follow_xrefs/disasm_nav/scroll_restore/
paging green. Needs a supervisor restart (heads tool changed).
Diffstat (limited to 'idatui/domain.py')
| -rw-r--r-- | idatui/domain.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/idatui/domain.py b/idatui/domain.py index e392936..7452ffd 100644 --- a/idatui/domain.py +++ b/idatui/domain.py @@ -595,7 +595,8 @@ class ListingModel: if self._done or self._next is None: return 0 frm = self._next - payload = self._prog.client.call("heads", addr=hex(frm), count=self.PAGE) + payload = self._prog.client.call( + "heads", addr=hex(frm), count=self.PAGE, annotate=True) rows = payload.get("heads", []) if isinstance(payload, dict) else [] cur = payload.get("cursor", {}) if isinstance(payload, dict) else {} page = [] @@ -608,7 +609,10 @@ class ListingModel: with self._lock: base = len(self._heads) for i, h in enumerate(page): - self._by_ea.setdefault(h.ea, base + i) + # Banner rows (function headers/separators) are display-only; + # don't index them so navigation lands on real code/data. + if h.kind not in ("sep", "funchdr"): + self._by_ea.setdefault(h.ea, base + i) self._heads.append(h) nxt = cur.get("next") if nxt is None: |
