Remove find_inferior usage for thread_search
authorSimon Marchi <simon.marchi@ericsson.com>
Sat, 28 Oct 2017 03:44:12 +0000 (23:44 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Sat, 28 Oct 2017 03:44:12 +0000 (23:44 -0400)
commitbac608e7e11fa83a648c0980883f810ebd1874b1
tree732e1c31495b3b1cf2bad1de95434e403da59ced
parenteaddb425928bb4ae21c0c6644b4bedf3d16cb6fa
Remove find_inferior usage for thread_search

Replace it with for_each_thread.  While at it, we can inline the
callback code.  One little change is that I am using the
prev_general_thread variable instead of current_gen_ptid, since they
should have the same value.

gdb/gdbserver/ChangeLog:

* target.c (struct thread_search): Remove.
(thread_search_callback): Remove.
(prepare_to_access_memory): Use for_each_thread instead of
find_inferior.  Inline code from thread_search_callback.
gdb/gdbserver/ChangeLog
gdb/gdbserver/target.c