See https://github.com/blacksphere/blackmagic/wiki/Hacking