Skip to content

Instantly share code, notes, and snippets.

View napsy's full-sized avatar

Luka Napotnik napsy

View GitHub Profile
@napsy
napsy / gist:939481
Created April 24, 2011 11:00
Adding watchpoints to memory regions to detect r/w access
// Author: Luka Napotnik <luka.napotnik@gmail.com>
// This code is public domain.
#include <stdlib.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>