Fix a bug in process_stopped() that never reported about stopped process
Use ptrace(PT_IO) instead of ptrace(PT_READ_I)

On FreeBSD ptrace(PT_READ_I) always returns int, it is not sutable for
amd64 architecture which requires long for pointers.