$ xref error
On this page
Enum variant whose Display/match arm names a text: the jump-table index of the referencing arm.
Resolves relative jump tables into variant arm ranges, string literals per arm, reverse instruction-to-arm ownership, and constant error returns.
Usage
xref error [OPTIONS] <TEXT>
Arguments and options
Arguments
<TEXT>Options
--back <BACK>Examples
All examples were recorded on public binaries; see Provenance.
Error 13
Finds return/assign sites setting a specific constant code and their enclosing jump-table variants.
$ xref -b xref.stripped error 13
0xf02b8 in 0xd7740 variant 2 (0x2), 5 (0x5) table 0xc338 (dispatch 0xe11de, 6 arms) arm 0xe1278 0xf03c6 in 0xd7740 variant 2 (0x2), 5 (0x5) table 0xc338 (dispatch 0xe11de, 6 arms) arm 0xe1278 2 references
xref: load 634.8µs, total 3.5ms
Reading the output
- One line per code reference to the text: where it is used, the function, the enum variant indices whose jump-table arm leads there, the table (with its dispatch instruction and arm count) and the arm.
- The last line counts the references.
Limits
- Only
Display/matchcode compiled to jump tables is resolved; a variant mapped throughifchains or a lookup table gives no variant index.
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/error.md · generated for the site; edit the Markdown, not this page.