debugger: Fixed wait_event() timeout behaviour.
Fixes issue #1.