WASM-TOOLS(1)
π WASM-TOOLS(1) π
okay bestie, this page lives in the User Commands section of the manual and it's all about the wasm-tools addr2line subcommand. yes it's a whole mouthful, we'll get through it together π«Ά
β¨ NAME β¨
wasm-tools addr2line β translate a WebAssembly address to a filename and line number using DWARF debugging information. literally a glow-up for raw numbers, it's giving "who am i really" π
π SYNOPSIS π
wasm-tools addr2line [OPTIONS] [INPUT] [ADDRESSES]...
πΈ DESCRIPTION πΈ
okay so. translate a WebAssembly address to a filename and line number using DWARF debugging information. that's the whole vibe π
here's the tea: WebAssembly binaries compiled with Clang can have DWARF debug information inserted into them, and that's what maps from WebAssembly instruction offsets to the original filenames and line numbers. iconic behavior honestly. so like, when you're compiling C you can pass the -g argument, or when you're compiling Rust you can pass -Cdebuginfo=1 (or just live your life with the default dev profile for Cargo, she's already got it). this subcommand will parse that DWARF debugging information and translate a list of addresses to their original filenames and line numbers. no cap β¨
each address may have multiple lines printed for it, and that's because it indicates that the address is an inlined function into another function. (inception but make it debugging π) frames are printed innermost or youngest first.
π§ Arguments:
[INPUT]β the input file to process.
if not provided, or if this is -, then stdin is read entirely and processed. fyi for most subcommands this input can either be a binary *.wasm file or a textual format *.wat file. choose your fighter π
[ADDRESSES]...β the addresses to convert to filenames and line numbers.
arguments can be specified as either 0x... or @... in hexadecimal, or are otherwise parsed as a base-10 address. and listen β addresses should be relative to the beginning of the module, unless --code-section-relative is passed in, in which case they should be relative to the beginning of the contents of the code section. context matters, bestie π
π OPTIONS π
--generate-dwarf <lines|full>β optionally generate DWARF debugging information from WebAssembly text files.
when the input to this command is a WebAssembly text file, such as *.wat, then this option will instruct the text parser to insert DWARF debugging information to map binary locations back to the original source locations in the input *.wat file. big main character energy for your text files tbh. this option has no effect if the INPUT argument is already a WebAssembly binary, or if the text format uses (module binary ...). (she simply does not apply π)
-gβ shorthand for--generate-dwarf full. tiny but mighty, we stan an abbreviation π-o,--output <OUTPUT>β where to place output.
if not provided then stdout is used. default behavior is just yapping into your terminal, and honestly? relatable.
-v,--verbose...β use verbose output (-vinfo,-vvdebug,-vvvtrace). the more v's, the more she tells you π£οΈ--color <COLOR>β configuration over whether terminal colors are used in output.
supports one of auto|never|always|always-ansi. the default is to detect what to do based on the terminal environment, for example by using isatty.
[default: auto]
--code-section-relativeβ indicates that addresses are code-section-relative instead of offsets from the beginning of the module. shifting the whole frame of reference, we love a perspective change π¦-h,--helpβ print help (see a summary with-h). when in doubt, ask for help, that's self care fr fr π
β οΈ quick vibe check:--generate-dwarfonly does anything for a*.wattext input β if yourINPUTis already a binary, or your text uses(module binary ...), it's a no-op. don't come for me, that's literally what the page says π
and that's the whole manual, bestie!! this was wasm-tools addr2line version 1.239.0+ds, from August 2026, served fresh from the WASM-TOOLS(1) manual. slay, go translate some addresses, you've got this ππ
π¦ where this page comes from
- ubuntu stonking: wasm-tools 1.239.0+ds-10 Β· Apache-2.0 OR Apache-2.0 WITH LLVM exception OR MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms