XRef
Documentation menu
xrefcode.com / docs / cli / istr

$ xref istr

On this page
  1. Usage
  2. Arguments and options
  3. Examples
  4. A string built inline
  5. Limits
  6. Provenance

Find strings that a function builds from immediate stores instead of reading them from .rodata: compilers write short strings with movabs / mov [mem], imm instructions, so a text search of the data sections misses them. istr TEXT is the same search as refs --inline TEXT.

Usage

xref istr <TARGETS>...

Arguments and options

Arguments

<TARGETS>...
Texts to search for.

Examples

A string built inline

Command
$ xref -b xref.stripped istr "while ("
Output
0xcfa1b  in 0xc7fc0..0xd0a9d  "while (" (7/7 bytes at 0xcfa1b)
1 hits
stderr
xref: load 459.0µs, total 1.8ms

The line gives the first store instruction, the function range that contains it, the text, and how many of its bytes were found in the stores (7/7 bytes at 0xcfa1b).

Limits

Provenance

Recorded with a development build of xref after 0.4.0 on Linux x86-64, on xref.stripped = a stripped xref build (the binary of the home-page examples). Output is unchanged except that whitespace at the end of each line and empty lines at the end of the output are removed; long outputs are cut where marked.

Source: docs/cli/istr.md · generated for the site; edit the Markdown, not this page.