• Stars
    star
    145
  • Rank 252,713 (Top 5 %)
  • Language
    Go
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

debugger-from-scratch

This is a very simple debugger that shows how ptrace can be used to set breakpoints and generate stack traces in a target process. You can choose where to breakpoint the target process, and single step or continue to the next breakpoint (or target exit).

Big caveat: it assumes there is only one file in the target!

I fully expect this only to work on Linux.

This is a more detailed version of the code I wrote in my Debuggers From Scratch talk at dotGo Paris. Here are the slides from that talk.

A note on compiling the target executable

You may find it helpful to compile your target excutable with --gcflags="all=-N -l" (--gcflags="-N -l" in Go 1.9 and earlier) to turn off compiler optimization and in-lining (otherwise you might find that the symbol table doesn't appear to know about code where you expect it to be!)

More Repositories

1

containers-from-scratch

Writing a container in a few lines of Go code, as seen at DockerCon 2017 and on O'Reilly Safari
Go
1,445
star
2

ebpf-beginners

The beginner's guide to eBPF
Python
1,175
star
3

learning-ebpf

Learning eBPF, published by O'Reilly - out now! Here's where you'll find a VM config for the examples, and more
C
518
star
4

strace-from-scratch

As seen at Gophercon 2017
Go
300
star
5

lb-from-scratch

A very basic eBPF Load Balancer in a few lines of C
C
203
star
6

libbpfgo-beginners

Basic eBPF examples in Golang using libbpfgo
C
188
star
7

secure-connections

Simple client and server for showing what's happening with certificates during TLS setup
Go
92
star
8

ebpf-networking

The Beginner's Guide to eBPF Programming for Networking
C
83
star
9

container-security

Resources for the O'Reilly Container Security book
78
star
10

running-with-scissors

Resources from my KubeCon + CloudNativeCon keynote
48
star
11

no-meltdown

Resources for "Don't Have A Meltdown"
Go
36
star
12

hello-container-world

Simple examples for containerizing golang code
Go
18
star
13

containers-and-go

An introduction to containers for Go programmers
17
star
14

kubecon-seattle

KubeCon + CloudNativeCon Seattle
Go
14
star
15

dockerregistry

Gets some Docker registry data and has a look at the layers
Python
8
star
16

force-awakens

Config files for KubeCon Amsterdam demo
Shell
5
star
17

katacoda-scenarios

Katacoda Scenarios
Shell
5
star
18

ebpf-advent

Advent of code in eBPF
C
4
star
19

download-shopify-theme

Command line tool to download Liquid files from a Shopify store's theme
Python
3
star
20

whoisinthehouse

Alexa skill for keeping track of the people in the house
Python
2
star
21

hello-cloudevents

A very quick demonstration of CloudEvents
Go
2
star
22

adventofcode

Can't throw them away!
Go
1
star