Write a Native x64 Debugger from Scratch
Sy Brand

#Debugger
#C++
#Linux
#Assembly
#Hardware
Master the inner workings of your x64 Linux system and expand your OS expertise by writing your very own debugger using C++.
If debuggers seem like magic to you, there is no better way to demystify them than to write your own. This book will show you exactly how to do it, walking you through the entire process of building a debugger for x64 Linux systems using C++. As go from an empty filesystem folder to a fully fledged debugger capable of setting breakpoints, stepping through code, manipulating variables, and more, you’ll learn how to:
As you add features to your debugger, you’ll also pick up a wealth of knowledge about operating systems, compilers, software testing, and low-level programming that you can use in your day-to-day development.
Table of Contents
1. Project Setup
2. Compilation and Computer Architecture
3. Attaching to a Process
4. Pipes, procfs, and Automated Testing
5. Registers
6. Testing Registers with x64 Assembly
7. Software Breakpoints
8. Memory and Disassembly
9. Hardware Breakpoints and Watchpoints
10. Signals and Syscalls
11. Object Files
12. Debug Information
13. Line Tables
14. Source-Level Breakpoints and Stepping
15. Call Frame Information
16. Stack Unwinding
17. Shared Libraries
18. Multithreading
19. Dwarf Expressions
20. Variables and Types
21. Expression Evaluation
22. Advanced Topics
Sy Brand is Microsoft’s C++ Developer Advocate. With more than 10 years’ experience in developer tooling, they’ve worked on profilers, compilers, language runtimes, standard libraries, and, of course, debuggers. They’ve also contributed to the standards for C++, DWARF, and HSA.
They graduated from the University of St Andrews with a 1st class degree in computer science, where they specialized in compiler implementation.
Outside the world of technology, they are a published poet, maker of experimental films and music, activist, and parent to three cats and one entire human.









