LLVM-DWARFUTIL(1)

πŸ“¦ version 23.1.3, in centos-stream 9

πŸ’… LLVM-DWARFUTIL(1) β€” the LLVM manual page, bestie edition πŸŽ€

okay so picture this: llvm-dwarfutil, from the LLVM fam. a whole little tool for copying and manipulating debug info, and honestly? she's iconic. let's get into it ✨


🌸 NAME 🌸

llvm-dwarfutil β€” a tool to copy and manipulate debug info. that's the whole gig. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

llvm-dwarfutil [options] input output

like, one input, one output, and any options you feel like sprinkling in between. simple!


πŸ’– DESCRIPTION πŸ’–

llvm-dwarfutil is a tool to copy and manipulate debug info. main character energy, truly.

In basic usage, it makes a semantic copy of the input to the output. that's the baseline. but the second you specify any options, the output may be modified along the way β€” e.g. by removing unused debug info. so it's a copy, but make it fashion ✨

If - is specified for the input file, the input is read from the program's standard input stream. If - is specified for the output file, the output is written to the standard output stream of the program. pipes, bestie. we love a pipeline moment 🫢

🍼 heads up, gentle reminder: the tool is still in active development. she's growing, ok? be nice to her.

πŸ’… COMMAND-LINE OPTIONS πŸ’…

the flags, the moment, the menu. every single one, no skipping πŸ“

  • --garbage-collection β€” removes pieces of debug information that are related to discarded sections. here's the lore: when the linker does section garbage collection, the abandoned debug info gets left behind, and that abandoned debug info references address ranges using tombstone values. so when this option is specified, the tool removes debug info which is marked with the tombstone value. bye bye leftovers πŸ’€

That option is enabled by default. slay.

  • --odr-deduplication β€” removes duplicated types (if "One Definition Rule" is supported by the source language). keeps the first type definition and removes the other definitions, potentially significantly reducing the size of the output debug info. so efficient. obsessed πŸ”₯

That option is enabled by default. periodt.

  • --help, -h β€” print a summary of command line options. your little cheat sheet πŸ’œ
  • --no-garbage-collection β€” disable --garbage-collection. the off switch for the tombstone cleanup.
  • --no-odr-deduplication β€” disable --odr-deduplication. keeps all your duplicate types around.
  • --no-separate-debug-file β€” disable --separate-debug-file.
  • --num-threads=<n>, -j β€” specifies the maximum number (n) of simultaneous threads to use for processing. go parallel, bestie 🧚
  • --separate-debug-file β€” generate a separate file containing the output debug info. using llvm-dwarfutil with that option equals to the following set of commands:
llvm-objcopy --only-keep-debug in-file out-file.debug
llvm-objcopy --strip-debug in-file out-file
llvm-objcopy --add-gnu-debuglink=out-file.debug out-file

literally the same thing, just one command instead of three πŸ’«

  • --tombstone=<value> β€” value can be one of the following values:
    • bfd: zero for all addresses and [1,1] for DWARF v4 (or less) address ranges and exec.
    • maxpc: -1 for all addresses and -2 for DWARF v4 (or less) address ranges.
    • universal: both bfd and maxpc.
    • exec: match with address ranges of executable sections.

The value universal is used by default. 🌈

  • --verbose β€” enable verbose logging. note: this option disables multi-thread mode. yes, the chatter costs you your threads 😭
  • --verify β€” run the DWARF verifier on the output DWARF debug info. vibe check, but for debug info ⭐
  • --version β€” print the version of this program.

πŸŽ€ SUPPORTED FORMATS πŸŽ€

the following formats are currently supported by llvm-dwarfutil:

  • ELF

that's the list. one icon πŸ‘‘


πŸ‘‘ EXIT STATUS πŸ‘‘

llvm-dwarfutil exits with a non-zero exit code if there is an error. otherwise, it exits with code 0. clean exits only, bestie πŸ’–


πŸ™ˆ BUGS πŸ™ˆ

to report bugs, please visit https://github.com/llvm/llvm-project/labels/tools:llvm-dwarfutil/. tell them everything, they wanna know πŸ¦‹


⭐ AUTHOR ⭐

Maintained by the LLVM Team (https://llvm.org/).


2003-2026, LLVM Project


okay that's the whole page!! mwah πŸ’‹

πŸ’Œ little sign-off for the girlies who read to the bottom: this one's from the LLVM Project, page 23 of the manual, dated 2026-10-06 β€” so go forth and copy your debug info with confidence. xoxo 🫢✨
πŸ“¦ where this page comes from