That's a good informative article. I'd never stopped to think about how breakpoints work. Basically, you overwrite part the code to call an interrupt which sends SIGTRAP. Your SIGTRAP handler then has to both do what you want and execute the code that you patched over. Thanks for posting this, and please keeping posting more like it! It deserves more attention than it got.