for posterity, I wrote this fifteen years ago to help me debug C code.