diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index af2dc86..22603da 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -575,6 +575,7 @@ extern struct cleanup *make_cleanup_restore_current_thread (void); extern struct thread_info* inferior_thread (void); extern void update_thread_list (void); +extern void update_threads_executing (void); /* Delete any thread the target says is no longer alive. */ diff --git a/gdb/infrun.c b/gdb/infrun.c index 70d7a09..996bfbe 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -4615,10 +4615,12 @@ stop_all_threads (void) t = add_thread (event_ptid); t->stop_requested = 0; - t->executing = 0; t->resumed = 0; t->control.may_range_step = 0; + t->executing = 0; + update_threads_executing (); + /* This may be the first time we see the inferior report a stop. */ inf = find_inferior_ptid (event_ptid); diff --git a/gdb/thread.c b/gdb/thread.c index a66a2b5..5c07b78 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -2098,7 +2098,7 @@ gdb_thread_select (struct ui_out *uiout, char *tidstr, char **error_message) /* Update the 'threads_executing' global based on the threads we know about right now. */ -static void +void update_threads_executing (void) { struct thread_info *tp;