forked from Imagelibrary/binutils-gdb
Remove find_inferior_id
Remove find_inferior_id, replacing its usages with find_thread_ptid. find_thread_ptid was implemented using find_inferior_id, so move the implementation there instead. gdb/gdbserver/ChangeLog: * inferiors.c (find_inferior_id): Remove. (find_thread_ptid): Move implemention from find_inferior_id to here. * inferiors.h (find_inferior_id): Remove. * server.c (handle_status): Use find_thread_ptid. (process_serial_event): Likewise. * thread-db.c (find_one_thread): Likewise. (thread_db_thread_handle): Likewise. * win32-low.c (thread_rec): Likewise. (child_delete_thread): Likewise. (win32_thread_alive): Likewise. (get_child_debug_event): Likewise.
This commit is contained in:
@@ -3355,7 +3355,7 @@ handle_status (char *own_buf)
|
||||
if (last_status.kind != TARGET_WAITKIND_IGNORE
|
||||
&& last_status.kind != TARGET_WAITKIND_EXITED
|
||||
&& last_status.kind != TARGET_WAITKIND_SIGNALLED)
|
||||
thread = find_inferior_id (&all_threads, last_ptid);
|
||||
thread = find_thread_ptid (last_ptid);
|
||||
|
||||
/* If the last event thread is not found for some reason, look
|
||||
for some other thread that might have an event to report. */
|
||||
@@ -4081,9 +4081,7 @@ process_serial_event (void)
|
||||
/* GDB is telling us to choose any thread. Check if
|
||||
the currently selected thread is still valid. If
|
||||
it is not, select the first available. */
|
||||
struct thread_info *thread =
|
||||
(struct thread_info *) find_inferior_id (&all_threads,
|
||||
general_thread);
|
||||
thread_info *thread = find_thread_ptid (general_thread);
|
||||
if (thread == NULL)
|
||||
thread = get_first_thread ();
|
||||
thread_id = thread->id;
|
||||
|
||||
Reference in New Issue
Block a user