WASM-TOOLS(1)

πŸ“¦ version 1.239.0, in ubuntu stonking

πŸ’– 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 (-v info, -vv debug, -vvv trace). 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-dwarf only does anything for a *.wat text input β€” if your INPUT is 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