We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

A debugger from scratch

Formal Metadata

Title
A debugger from scratch
Title of Series
Number of Parts
50
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
At some stage in your programming life you may well have used a debugger, but did you wonder how it was able to step into and control your executable? In this talk we'll see how debuggers work by building one from scratch in a few lines of Go. In this talk Liz will explore how a debugger gains control of a process with the all-powerful ptrace system call. You'll see how we can find the machine code that corresponds to a line of human-readable source code and vice-versa. She will show how breakpoints are set, explain how the stack gets built up, and demonstrate how to generate a stack trace showing the path to that breakpoint. Even if you know nothing about machine code, you'll leave this talk with a better understanding of how a computer runs an executable, and how a debugger is able to start and stop the executable as you wish.