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

$ xref path

On this page
  1. Usage
  2. Arguments and options
  3. Examples
  4. Path 0xc7fc0 0x160bb0
  5. Reading the output
  6. Limits
  7. Provenance

Shortest call chains from function FROM to function TO over direct calls, tail jumps and pointer slots.

Finds shortest call chains between two functions and prints indented caller/callee trees annotated with panic source locations.

Usage

xref path [OPTIONS] <FROM> <TO>

Arguments and options

Arguments

<FROM>
Function where chains start (address or symbol name).
<TO>
Function where chains end (address or symbol name).

Options

--depth <DEPTH>
Maximum call-chain depth (hops).
default 8
--with-observed <WITH_OBSERVED>
Explicit observed-edge store tied to this binary; sample counts are not call counts.

Examples

All examples were recorded on public binaries; see Provenance.

Path 0xc7fc0 0x160bb0

Shortest call chains from 0xc7fc0 to 0x160bb0 with exact call-site addresses.

Command
$ xref -b xref.stripped path 0xc7fc0 0x160bb0
Output
0xc7fc0 -> 0x160bb0  (via 0xcf3cc)
0xc7fc0 -> 0xc7d60 -> 0x160bb0  (via 0xc8157, 0xc7fba)
0xc7fc0 -> 0xb43a0 -> 0x160bb0  (via 0xcea2e, 0xbafa7)
0xc7fc0 -> 0xc7d60 -> 0x124d50 -> 0x160bb0  (via 0xc8157, 0xc7e18, 0x124e0c)
0xc7fc0 -> 0x123950 -> 0x124d50 -> 0x160bb0  (via 0xcd2ae, 0x123b30, 0x124e0c)
0xc7fc0 -> 0xb43a0 -> 0xd5120 -> 0x160bb0  (via 0xcea2e, 0xb51e7, 0xd52b4)
0xc7fc0 -> 0xb43a0 -> 0xb3f00 -> 0x160bb0  (via 0xcea2e, 0xb7d23, 0xb41f6)
0xc7fc0 -> 0xb43a0 -> 0xc7d60 -> 0x160bb0  (via 0xcea2e, 0xba676, 0xc7fba)
8 paths
stderr
xref: load 608.2µs, total 2.6ms

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