LLVM-DWARFUTIL(1)

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

okay so before we even start: this whole page lives in the LLVM manual set, so like… that's the family it belongs to 🫢. Now buckle up, we're copying debug info and it's gonna slay.


✨ NAME ✨

llvm-dwarfutil β€” a tool to copy and manipulate debug info. literally what it says on the tin πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

llvm-dwarfutil [options] input output

πŸ¦‹ DESCRIPTION πŸ¦‹

llvm-dwarfutil is a tool to copy and manipulate debug info. that's the whole vibe.

in basic usage, it makes a semantic copy of the input to the output. like, a copy that actually means the same thing, not just a byte-for-byte photocopy, iykyk ✨. and if you pass any options, the output may be modified along the way β€” e.g. by removing unused debug info. glow-up courtesy of flags πŸ’…

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. dash dash bestie, very piping-friendly 🌈

the tool is still in active development. she's growing, be patient with her 🧚

πŸ‘‘ COMMAND-LINE OPTIONS πŸ‘‘

  • --garbage-collection β€” removes pieces of debug information related to discarded sections. see, when the linker does section garbage collection, the abandoned debug info just gets left behind like a ghost 😭. such 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. very much giving cleanup era ✨

that option is enabled by default. periodt.

  • --odr-deduplication β€” remove duplicated types (if "One Definition Rule" is supported by source language). keeps the first type definition and removes the other definitions, potentially significantly reducing the size of output debug info. not me deleting your duplicate type definitions πŸ’… no cap, the size savings are real.

that option is enabled by default too.

  • --help, -h β€” print a summary of command line options. the classic, the icon, the main character πŸ‘‘
  • --no-garbage-collection β€” disable --garbage-collection.
  • --no-odr-deduplication β€” disable --odr-deduplication.
  • --no-separate-debug-file β€” disable --separate-debug-file.
  • --num-threads=<n>, -j β€” specifies the maximum number (n) of simultaneous threads to use for processing. get her a little parallel sparkle ⚑
  • --separate-debug-file β€” generate a separate file containing output debug info. using llvm-dwarfutil with that option equals to the following set of commands, fr fr:
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

three commands in a trench coat πŸ§₯ iconic behavior.

  • --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. she contains multitudes πŸ’œ

  • --verbose β€” enable verbose logging. this option disables multi-thread mode. so like, you get the tea but you lose the parallelism, trade-offs bestie 😭
  • --verify β€” run the DWARF verifier on the output DWARF debug info. vibe check on your debug info, honestly πŸ”
  • --version β€” print the version of this program.

🌸 SUPPORTED FORMATS 🌸

the following formats are currently supported by llvm-dwarfutil:

  • ELF

one format, but she ate πŸ‘‘ (this list is short, the list is honest, we respect the list)


⭐ EXIT STATUS ⭐

llvm-dwarfutil exits with a non-zero exit code if there is an error. otherwise, it exits with code 0. so 0 = slay, nonzero = something went sideways πŸ’€


πŸ™ˆ BUGS πŸ™ˆ

to report bugs, please visit <https://github.com/llvm/llvm-project/labels/tools:llvm-dwarfutil/>. go tell them what's wrong, they want to know, be brave 🫢


πŸ’œ AUTHOR πŸ’œ

maintained by the LLVM Team (<https://llvm.org/>).


2003-2025, LLVM Project.


okay and that's the page!! 🌈 tiny cute sign-off: this beauty comes from the LLVM source, this particular rendering is dated 2025-01-17 with that little section number 19 tagging along β€” go build something iconic with it, bestie πŸ’–βœ¨

πŸ“¦ where this page comes from