gdbserver: Reset current_thread when the thread is removed.
authorAleksandar Ristovski <aristovski@qnx.com>
Fri, 16 Oct 2015 15:12:21 +0000 (11:12 -0400)
committerAleksandar Ristovski <aristovski@qnx.com>
Fri, 16 Oct 2015 15:13:31 +0000 (11:13 -0400)
commit833dcd29758287ac7799d9c022c0994f7c16608e
treef04dd7a222e656b50bd52006c24ba738ff223964
parent96e7a1eb6d09fda9e22e112e35e7d0085a8f4fd0
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/ChangeLog