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

$ xref where

On this page
  1. Usage
  2. Arguments and options
  3. Examples
  4. Where src/loops.rs
  5. Where src/image.rs --line 46
  6. Reading the output
  7. Limits
  8. Provenance

Functions passing source locations whose file contains a pattern (and optionally at one line).

Extracts core::panic::Location structs from .rodata even after strip --strip-all, linking stripped functions back to exact file:line:col anchors.

Usage

xref where [OPTIONS] <PATTERN>

Arguments and options

Arguments

<PATTERN>
Substring of the source file path.

Options

--line <LINE>
Only locations on this line.

Examples

All examples were recorded on public binaries; see Provenance.

Where src/loops.rs

All stripped functions referencing panic locations in src/loops.rs.

Command
$ xref -b xref.stripped where src/loops.rs
Output
0x951c0..0x95300  src/loops.rs:142
0xc7d60..0xc7fbf  src/loops.rs:45
0xc7fc0..0xd0a9d  src/loops.rs:108  src/loops.rs:131  src/loops.rs:132  src/loops.rs:139  src/loops.rs:152  src/loops.rs:157  src/loops.rs:158  src/loops.rs:186  src/loops.rs:202  src/loops.rs:203  src/loops.rs:209  src/loops.rs:210  src/loops.rs:65  src/loops.rs:69  src/loops.rs:77  src/loops.rs:85  src/loops.rs:87
0xd0aa0..0xd0d73  src/loops.rs:33
0x120d00..0x120d3e  src/loops.rs:142
21 locations, 21 references
stderr
xref: load 484.1µs, total 2.2ms

Where src/image.rs --line 46

Pinpoints the exact stripped function containing src/image.rs line 46.

Command
$ xref -b xref.stripped where src/image.rs --line 46
Output
0x9ef60..0x9f518  src/image.rs:46
1 locations, 1 references
stderr
xref: load 515.0µs, total 2.2ms

Reading the output

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/where.md · generated for the site; edit the Markdown, not this page.