gdbserver: Reset current_thread when the thread is removed.
authorAleksandar Ristovski <aristovski@qnx.com>
Fri, 16 Oct 2015 15:08:38 +0000 (11:08 -0400)
committerAleksandar Ristovski <aristovski@qnx.com>
Fri, 16 Oct 2015 15:11:07 +0000 (11:11 -0400)
commit96e7a1eb6d09fda9e22e112e35e7d0085a8f4fd0
tree448e47714ec2242170bb57604d9a25dc01832844
parent6457197210144f50a696097c0d308d81d46d5510
gdbserver: Reset current_thread when the thread is removed.

Reset current_thread and make sure 'remove_process' is used
after all associated threads have been removed first.

gdb/gdbserver/ChangeLog:
* inferiors.c (thread_pid_matches_callback): New function.
(find_thread_process): New function.
(remove_thread): Reset current_thread.
(remove_process): Assert threads have been removed first.
gdb/gdbserver/inferiors.c