~/talk

Debuggers from scratch

Talkat dotGo 2017 · on Monday, 2017-11-06· [go, security]
slides:none on file

Builds a working debugger in a few lines of Go that maps Go source lines to machine addresses, uses ptrace and the syscall poke to overwrite the first instruction byte with 0xCC breakpoint, and resumes the process to stop exactly at the intended source line. It extracts registers (instruction pointer, stack pointer, base pointer), walks stack frames to produce a trace, and admits the code overwrites that original byte without restoring it. The prototype runs and produces a trace in about fifteen minutes.

AI-written summary · about

  1. 0:00Introduction
  2. 0:45Ptrace
  3. 3:35DebugDosam
  4. 9:16Breakpoint
  5. 12:32Stack trace
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.