Make sure changes to the debug registers while inside a SIGTRAP exception are taken into account (based on a patch by Alex Pasadyn).