YASM_DBGFMTS(7)

✨ YASM_DBGFMTS ✨

okay bestie, welcome to the debug-format lore drop πŸ’– this is the yasm_dbgfmts page from the Yasm manual, and it's basically the group chat where all the debugging formats get introduced. let's get into it πŸ¦‹


🌸 SYNOPSIS 🌸

yasm -g dbgfmt ...

that's the whole vibe right there. -g dbgfmt, then whatever else you were gonna do. slay.


πŸ’… DESCRIPTION πŸ’…

so the standard Yasm distribution ships with a whole lil collection of modules, one for each different debugging format out there. the debugging info gets embedded right into the object file itself, no cap. and here's the tea: if you pick a debug format that isn't the "null" one, Yasm also starts outputting all the symbols into the object file β€” yes, including the local ones. all of them. the whole friend group πŸ‘‘

you pick your format on the yasm(1) command line with the -g dbgfmt option. that's it, that's the selector πŸŽ€


πŸ’€ CV8 πŸ’€

the CV8 debug format is what Microsoft Visual Studio 2005 (version 8.0) uses, and it is completely undocumented 😭 like, nobody wrote it down. it does bear strong similarities to the earlier CodeView formats though, so it's giving "we know the family, just not this specific cousin."

Yasm's support for CV8 is currently limited β€” it only generates assembly-level line number information (which lets you do some level of source-level debugging, better than nothing bestie 🫢).

where does it live? in the .debug$S and .debug$T sections of the Win64 object file. noted. memorized. ✨


🧚 DWARF2 🧚

DWARF 2 is a complex, well-documented standard for debugging information β€” highkey the main character of debug formats πŸ‘‘. it was created to overcome the shortcomings of STABS, and it allows for much more detailed and compact descriptions of:

  • data structures
  • data variable movement
  • complex language structures, such as those in C++

the debugging information is stored in sections β€” just like normal program sections β€” inside the object file. and Yasm supports full pass-through of DWARF2 debugging information (like, say, the stuff coming out of a C++ compiler), and it can also generate assembly-level line number information. versatile queen 🌈


πŸŽ€ NULL πŸŽ€

the "null" debug format is literally just a placeholder. it adds no debugging information to the output file. that's it. that's the whole personality. sometimes you just want nothing and that's valid 🫧


πŸ“ STABS πŸ“

the STABS debug format is a poorly documented, semi-standard format for debugging information in COFF and ELF object files. ngl, the vibe is "we made this up and moved on" πŸ™ˆ

the debugging information is stored as part of the object file's symbol table, which means it's limited in complexity and scope. like, it can only do so much.

but despite all that β€” STABS is a common debugging format on older Unix and compatible systems, and also on DJGPP. so it's got seniority, respect the elders πŸ’œ


🌟 SEE ALSO 🌟


⭐ AUTHOR ⭐

Peter Johnson <peter@tortall.net> Author.


Copyright Β© 2006 Peter Johnson


okay that's the whole page bestie, you're officially educated on debug formats πŸŽ“πŸ’– sending you so much love β€” this was brought to you by Yasm, from October 2006, and the page is YASM_DBGFMTS(7). go debug something iconic πŸ‘‘βœ¨

πŸ“¦ where this page comes from