---
name: "dwarf2sources"
section: "1"
platform: "linux"
package: "dwarf2sources"
version: "0.2.5-2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dwarf2sources"
---

# dwarf2sources(1)

list the source files for a given binary

## NAME

dwarf2sources - list the source files for a given binary

## SYNOPSIS

dwarf2sources \[**-o** *output.json*\] \[**-s** *strip-prefix*\] \[*file*\]...

## DESCRIPTION

dwarf2sources lists the source files that were used to create a given binary in JSON format. The input files must not be stripped and must contain debugging information in DWARF format.

- **-h**, **--help**

  Prints help information

- **-V**, **--version**

  Prints version information

- **-o**, **--output** \<output\>

  File to write JSON output to

- **-s**, **--strip-prefix** \<strip-prefix\>

  Strip given prefix from comp\_dir paths

## AUTHORS

This program was written by Sjoerd Simons based on the gimli 0.16.1 dwarfdump.rs example by Nick Fitzgerald, Philip Craig and other rust-dwarf developers.

## SEE ALSO

[**objdump**(1)](/objdump/1.md), [**strip**(1)](/strip/1.md)
