Search the rendered listing
search_textSearch IDA's rendered disassembly and comments for a text pattern or regex, scoped by start/end addresses to find code in large binaries.
Instructions
Search the rendered listing for pattern over [start, end).
Iterates idautils.Heads() in pure Python and renders each via
ida_lines.generate_disassembly(). Per-head iteration is cheap and
yields between heads, so the per-tool deadline (sync_wrapper) and the
UI Cancel button both interrupt the walk reliably — unlike the C-level
ida_search.find_text() it replaced, which on huge .text segments
could run for minutes without polling user_cancelled().
Use start/end to scope the work for predictable performance on
large binaries; without them the scan covers the whole image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Upper bound (hex or symbol, exclusive). Empty = last segment. | |
| limit | No | Max hits per page (default: 30, max: 500) | |
| regex | No | Treat pattern as a Python regex | |
| start | No | Lower bound (hex or symbol). Empty = first segment. | |
| include | No | 'disasm' | 'comments' | 'all' (default: all) | all |
| pattern | Yes | Text to search for in the rendered listing (literal substring by default) | |
| code_only | No | Restrict search to executable segments (default: true) | |
| instance_id | No | Optional database instance id. If omitted, use the current target. | |
| case_sensitive | No | Case-sensitive match (default: false) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| hits | No | ||
| error | No | ||
| cursor | No |