785922a gdbserver: Remove duplicate functions to find any thread of process

Authored and Committed by Simon Marchi 6 years ago
    gdbserver: Remove duplicate functions to find any thread of process
    
    We have about 6 functions/callbacks to find_inferior meant to find a
    thread that belongs to a given pid.  Remove all but
    find_any_thread_of_pid and replace their uses with
    find_any_thread_of_pid.
    
    gdb/gdbserver/ChangeLog:
    
    	* server.c (first_thread_of): Remove.
    	(process_serial_event): Replace usage of first_thread_of with
    	find_any_thread_of_pid.
    	* tracepoint.c (same_process_p): Remove.
    	(gdb_agent_about_to_close): Replace usage of same_process_p with
    	find_any_thread_of_pid.
    	* linux-x86-low.c (same_process_callback): Remove.
    	(x86_arch_setup_process_callback): Replace usage of
    	same_process_callback with find_any_thread_of_pid.
    	* thread-db.c (any_thread_of): Remove.
    	(switch_to_process): Replace usage of any_thread_of with
    	find_any_thread_of_pid.
    	* inferiors.c (thread_pid_matches_callback): Remove.
    	(find_thread_process): Adjust to use find_any_thread_of_pid.
    
        
file modified
+17 -0
file modified
+1 -13
file modified
+1 -14
file modified
+3 -16
file modified
+1 -14
file modified
+1 -13