diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 1d240f25e18..a80a0887d2f 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2015-12-22 Joel Brobecker + + * target.c (thread_search_callback): Add check that + the thread_stopped target callback is not NULL before + calling it. + 2015-12-21 Yao Qi * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c index b376ce8f86b..59736e5afd0 100644 --- a/gdb/gdbserver/target.c +++ b/gdb/gdbserver/target.c @@ -68,7 +68,9 @@ thread_search_callback (struct inferior_list_entry *entry, void *args) if (ptid_get_pid (entry->id) == ptid_get_pid (s->current_gen_ptid) && mythread_alive (ptid_of (thread))) { - if (s->stopped == NULL && thread_stopped (thread)) + if (s->stopped == NULL + && the_target->thread_stopped != NULL + && thread_stopped (thread)) s->stopped = thread; if (s->first == NULL)