~/talk

Learn how debuggers work by building your own one

Talkat GopherCon UK 2023 · 2023-08-16..08-18· [go]
links:none on file
slides:none on file

A tiny debugger is built in Go that actually works: it launches a traced child on Linux, uses ptrace peek/poke to write an 0xCC breakpoint and restore original bytes, implements continue, single-step, PtraceGetRegs/SetRegs to read and move the PC, and parses DWARF and symbol tables to map source lines to program counters. Step-in/step-out/step-over are implemented by inserting and clearing breakpoints at call and return addresses. Variable inspection remains unfinished.

AI-written summary · about

  1. 0:00Building a debugger
  2. 1:08Talk audience and speaker
  3. 3:35Debugger basics with Go
  4. 6:24Debugger features and optimizations
  5. 8:32Program counter and registers
  6. 9:14DWARF format
  7. 10:19PTrace system calls
  8. 13:27Tracing child process
  9. 15:58Step through instructions
  10. 17:26Symbol tables and lookup
  11. 19:57Breakpoints insertion/removal
  12. 25:54Step in/out/over
  13. 27:00Smallugger project
  14. 34:08Debugging with step commands
  15. 36:16Debugger architecture
  16. 38:03Variable inspection and improvements
  17. 39:11Delve features
  18. 40:14Debugger development reading
  19. 41:40Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.