LLVM-DWARFUTIL(1)
π 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. usingllvm-dwarfutilwith 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β-1for all addresses and-2for DWARF v4 (or less) address ranges.universalβ bothbfdandmaxpc. 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.
β COPYRIGHT β
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
- ubuntu noble: llvm-16 1:16.0.6-23ubuntu4 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms