aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-23 20:35:13 +0200
committerblasty <blasty@local>2026-07-23 20:35:13 +0200
commitf5aaf50476e5bf72eaec0c09ddd984b28960ca8d (patch)
tree223ec22ab0692a88397fbaabd55c805636c36e4c /server
parentlisting: two-level indent, address on headers, drop 'near', opcode cap+cycle (diff)
downloadida-tui-f5aaf50476e5bf72eaec0c09ddd984b28960ca8d.tar.gz
ida-tui-f5aaf50476e5bf72eaec0c09ddd984b28960ca8d.tar.xz
ida-tui-f5aaf50476e5bf72eaec0c09ddd984b28960ca8d.zip
listing: code labels on their own line; search loaded portion (no wedge)
Code labels (loc_XXX/jump targets) get their OWN line at depth 0, like IDA, instead of inline with the instruction: the heads walker (annotate) emits a kind=label row ('loc_XXX:') before a named non-function-start code head and strips the name from the instruction. ListingModel doesn't index label rows (goto/xref/follow still land on the code); ListingView renders them at depth 0. Also fix a search regression the extra rows exposed: search no longer forces a blocking full-segment load_all (which stalled/thrashed the worker and wedged the session on the larger annotated listing). It searches the loaded portion; the background grower streams the rest and unloaded lines are skipped until they arrive. Verified: labels on their own line; search 2.9s (was 51.9s+wedge); search/mouse/ rename_history/continuous_view/func_banners/follow_xrefs 26/0.
Diffstat (limited to 'server')
-rw-r--r--server/patch_server.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/patch_server.py b/server/patch_server.py
index 73144fe..7ee490a 100644
--- a/server/patch_server.py
+++ b/server/patch_server.py
@@ -451,6 +451,14 @@ def heads(
if at_start:
row = dict(row)
row["name"] = None # the name is shown on the proc header line
+ elif annotate and row.get("kind") == "code" and row.get("name"):
+ # A code label (loc_XXX/jump target) gets its OWN line at depth 0,
+ # like IDA; strip it from the instruction row below.
+ nm = row["name"]
+ out.append({"ea": hex(e), "kind": "label", "size": 0,
+ "text": nm + ":", "name": nm})
+ row = dict(row)
+ row["name"] = None
out.append(row)
if row.get("kind") == "data":
out.extend(_idatui_struct_member_rows(e)) # expand struct fields