This patch adjusts the bsd-uthread target to use thread_change_ptid, and to never let the core see an event happen in a thread not in the thread table. Tested on i386-unknown-freebsd6.0 with a little hack in the testsuite to link the gdb.thread tests against -lc_r instead of -lpthread, and on i386-unknown-openbsd4.3, where no hack is needed. This patch depends on patch 1 and 2. OK? -- Pedro Alves