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

$ xref dump

On this page
  1. Usage
  2. Arguments and options
  3. Examples
  4. Dump --out out-loops --src src/loops.rs
  5. Reading the output
  6. Limits
  7. Provenance

Parallel modular pseudo-C dump grouped by recovered Rust source paths (<OUT>/crate/src/mod.c).

Groups stripped functions by embedded Rust panic file paths and writes modular .c files in parallel. Stdout and generated file preview are shown separately below.

Usage

xref dump [OPTIONS] --out <OUT>

Arguments and options

Options

--out <OUT>
Output directory for grouped .c module files.
--src <SRC>
Optional substring filter on source path or symbol name (e.g. src/loops.rs).
--fields
Rewrite raw pointer offsets as inferred ->f_<off> field hints.
--goto
Keep residual labels and gotos in every dumped function.

Examples

All examples were recorded on public binaries; see Provenance.

Dump --out out-loops --src src/loops.rs

Exports the 4 functions attributed to src/loops.rs into out-loops/src/loops.c.

Command
$ xref -b xref.stripped dump --out out-loops --src src/loops.rs
Output
dumped 4 functions into 1 files (12738 bytes) in out-loops (5.4ms)
stderr
xref: load 604.8µs, total 6.1ms

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