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

$ xref src

On this page
  1. Usage
  2. Arguments and options
  3. Examples
  4. Src 0xfbff0
  5. Src
  6. Src
  7. Src
  8. Reading the output
  9. Limits
  10. Provenance

Rust source locations (panic Locations) the function containing an address passes.

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

Usage

xref src <ADDR>

Arguments and options

Arguments

<ADDR>
An address inside the function.

Examples

All examples were recorded on public binaries; see Provenance.

Src 0xfbff0

Lists every panic Location struct passed inside stripped function 0xfbff0..0xfc159.

Command
$ xref -b xref.stripped src 0xfbff0
Output
function 0xfbff0..0xfc159
0xfc120  src/cfg.rs:75:25
0xfc132  src/cfg.rs:89:107
0xfc147  src/cfg.rs:95:29
3 locations
stderr
xref: load 524.0µs, total 1.4ms

Src

Command
$ xref -b xref.stripped src 0xc7d60
Output
function 0xc7d60..0xc7fbf
0xc7faa  src/loops.rs:45:36
1 locations
stderr
xref: load 470.0µs, total 1.3ms

Src

Command
$ xref -b xref.stripped src 0x9a8a0
Output
function 0x9a8a0..0x9a97a
0x9a947  src/cfg.rs:154:22
0x9a959  src/cfg.rs:75:25
0x9a96b  src/cfg.rs:154:57
3 locations
stderr
xref: load 518.9µs, total 1.5ms

Src

Command
$ xref -b xref.stripped src 0xa2270
Output
function 0xa2270..0xa2566
0xa2548  src/image.rs:184:58
1 locations
stderr
xref: load 518.1µs, total 1.5ms

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