aboutsummaryrefslogtreecommitdiffstats
path: root/idatui
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-23 02:12:24 +0200
committerblasty <blasty@local>2026-07-23 02:12:24 +0200
commit938235f7484b791a3828da3905c7c4949b8dba30 (patch)
treec13920c817bc77a147e4272e49281cec16ab9ec3 /idatui
parentTODO: M4 progress — string auto-detect + streaming done; struct-expand/unif... (diff)
downloadida-tui-938235f7484b791a3828da3905c7c4949b8dba30.tar.gz
ida-tui-938235f7484b791a3828da3905c7c4949b8dba30.tar.xz
ida-tui-938235f7484b791a3828da3905c7c4949b8dba30.zip
listing: expand struct-typed globals into member rows (M4 item 3)
A struct-typed data item rendered as one dense 'MyS <...>' line. Now the heads walker emits indented member rows after the summary (from get_udt_details): +off name type, each a head of kind member at ea+offset. ListingView renders them indented/dimmed; _line_plain matches for cursor/search. Verified: a struct global expands to +0 a int / +4 b char[4] / +8 c __int16, member rows carry field addresses. New listing_struct_expand scenario; listing suite 22/0 (in-process).
Diffstat (limited to 'idatui')
-rw-r--r--idatui/app.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/idatui/app.py b/idatui/app.py
index 27dc33e..234b720 100644
--- a/idatui/app.py
+++ b/idatui/app.py
@@ -53,6 +53,7 @@ _S_MNEM = Style(color="cyan")
_S_OPBYTES = Style(color="grey50") # raw opcode bytes column
_S_DATA = Style(color="#c8a15a") # data items in the flat listing (db/dw/strings)
_S_UNK = Style(color="grey54", italic=True) # undefined bytes in the flat listing
+_S_MEMBER = Style(color="#9a8a6a") # struct field rows (expanded, indented)
_S_CURSOR = Style(bgcolor="grey30")
_S_DIM = Style(color="grey42", italic=True)
_S_MATCH = Style(bgcolor="#7a5c00") # all search matches
@@ -941,7 +942,8 @@ class ListingView(SearchMixin, NavMixin, ColumnCursor, ScrollView, can_focus=Tru
h = self._head(idx)
if h is None:
return None
- return f"{h.ea:08X} " + self._name_prefix(h) + h.text
+ indent = " " if h.kind == "member" else ""
+ return f"{h.ea:08X} " + indent + self._name_prefix(h) + h.text
# -- public API -------------------------------------------------------- #
def load(self, model: ListingModel, name: str, cursor: int = 0,
@@ -1057,6 +1059,8 @@ class ListingView(SearchMixin, NavMixin, ColumnCursor, ScrollView, can_focus=Tru
segs.append(Segment(" " + rest, _S_INSN))
elif h.kind == "data":
segs.append(Segment(h.text, _S_DATA))
+ elif h.kind == "member":
+ segs.append(Segment(" " + h.text, _S_MEMBER))
else:
segs.append(Segment(h.text, _S_UNK))
strip = Strip(segs)