Coder Musings
Standalone deep dives and case studies. No multi-part series, just singular, highly-opinionated explorations of systems programming and engineering architecture.
Introspecting the Stack: Building a custom backtrace() from scratch
"You want to print a stack trace when your program crashes, but relying on libc's backtrace() feels too much like magic. How does a program actually read its own call stack while running?"
The Anatomy of a Perfect Stack Trace: Making Hand-Written Assembly Production-Ready
"Writing raw assembly is fun, but when it crashes, debuggers like GDB just show ?? () instead of a stack trace. How do C compilers make assembly 'debuggable'?"