Day 3 at the Recurse Center

- 1 min

Today I paired with Gargi on creating a debugger from scratch in Go. I’ve never even really looked at Go before and typically haven’t done much with the types of syscalls required to construct a debugger.

It was really fascinating! The basic premise is using ptrace to attach to another process and be able to stop execution at the given breakpoint. This involves finding the correct address in the assembly code of the target program and placing in a software interrupt, and from there, being able to execute code and the other things that a debugger does.

We had some environment issues in the morning, but started making some decent headway in the afternoon. We were able to PTRACE_ATTACH to a child process and PTRACE_PEEKDATA to look at a random address. We ran into lots of interesting hurdles, and it was a tiring but really beneficial day.

Tomorrow we plan to keep hacking on it!

Andrew Pierce

Andrew Pierce

Software Engineer based in Durham, NC

comments powered by Disqus
rss facebook twitter github youtube mail spotify instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora