LLVM-DWARFUTIL(1)

πŸ“¦
version 16.0.6 Β· 3 versions
, in ubuntu noble

πŸ’– LLVM-DWARFUTIL(1) πŸ’–

okay bestie, so like β€” this is the manual for llvm-dwarfutil, one of the LLVM tools. Yeah. The LLVM one. We're doing this. Sit down, grab a boba, because debug info is about to become your whole personality. πŸ§‹βœ¨


🌸 NAME 🌸

llvm-dwarfutil β€” a tool to copy and manipulate debug info πŸ’…


✨ SYNOPSIS ✨

llvm-dwarfutil [options] input output

that's it. that's the whole vibe. input, output, and whatever options you're feeling. πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

so, llvm-dwarfutil is a tool to copy and manipulate debug info. no cap.

in its basic usage era, it makes a semantic copy of the input to the output. like, it copies it but with ✨intention✨. and if you specify any options, the output may be modified along the way β€” for example, by removing unused debug info. it's giving glow-up but for debug info honestly.

if β€œ-” is specified for the input file, the input is read from the program's standard input stream. and if β€œ-” is specified for the output file, the output is written to the standard output stream of the program. pipes? we love her. 🌈

⚠️ real talk though: the tool is still in active development. she's growing. she's evolving. be nice to her. 🫢

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

okay this is the main character section. every single one, no skips, no summarising, we're doing all of them because that's the rules and also because I love you.

  • --garbage-collection β€” removes pieces of debug information related to discarded sections. so when the linker does section garbage collection, the abandoned debug info just gets left behind like an unread text 😭. 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. bye bestie πŸ‘‹
this option is enabled by default. it's just her natural state.
  • --odr-deduplication β€” removes duplicated types (if β€œOne Definition Rule” is supported by the source language). it keeps the first type definition and removes the other definitions, which can potentially significantly reduce the size of the output debug info. like, declutter your life queen πŸ’…
this option is also enabled by default. she comes pre-slay.
  • --help, -h β€” prints a summary of command line options. the classic. the icon. when in doubt, ask for help. πŸŽ€
  • --no-garbage-collection β€” disables --garbage-collection. sometimes you want to keep the mess. valid honestly.
  • --no-odr-deduplication β€” disables --odr-deduplication. you want your duplicated types? okay girl, you do you.
  • --no-separate-debug-file β€” disables --separate-debug-file. keeps everything in one file, one roof, one household. 🏠
  • --num-threads=<n>, -j β€” specifies the maximum number (n) of simultaneous threads to use for processing. more threads, more chaos, more speed. ⚑
  • --separate-debug-file β€” generates a separate file containing the output debug info. using llvm-dwarfutil with this option is equal to running this exact 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

yes, three whole commands. she's doing all that for you in one go. ate. 🍽️

  • --tombstone=<value> β€” where <value> can be one of these, and I need you to actually read them because they're all different:
    • 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. the both-er. the "why not" option.
    • exec β€” match with address ranges of executable sections.
the value universal is used by default. yes, the greedy one. iconic behaviour.
  • --verbose β€” enables verbose logging. she tells you everything, every detail, no filter, fr fr.
heads up: this option disables multi-thread mode. you cannot have both. choose your fighter.
  • --verify β€” runs the DWARF verifier on the output DWARF debug info. vibe check on your debug info. βœ…
  • --version β€” prints the version of this program. gotta know what era of the tool you're in. ⭐

πŸ¦‹ SUPPORTED FORMATS πŸ¦‹

the following formats are currently supported by llvm-dwarfutil:

  • ELF

that's the list. it's short. it's honest. it's giving minimalist. πŸ’€


🌈 EXIT STATUS 🌈

llvm-dwarfutil exits with a non-zero exit code if there is an error. otherwise, it exits with code 0.

zero = we're so back. non-zero = it's so over. 😭


πŸ™ˆ BUGS πŸ™ˆ

to report bugs, please visit <‐ https://github.com/llvm/llvm-project/labels/tools:llvm-dwarfutil/.

(yeah there's a lil line-break hyphen situation in there, that's just how the original is living, I'm not touching it 🫢)


πŸ’œ AUTHOR πŸ’œ

maintained by the LLVM Team (https://llvm.org/). love them. couldn't do this without them.


2003-2024, LLVM Project


and that's the whole page, bestie!! πŸŽ€ this fine piece of documentation came out of the LLVM manual set, page number 15, dated 2024-04-14 β€” so if you're reading this way in the future, know that this is the 2024-04-14 cut of LLVM-DWARFUTIL(1) and it was serving exactly as hard back then as it is right now. go copy some debug info. slay. πŸ’–βœ¨

πŸ“¦ where this page comes from