From e9d196c53fe0ea5fd893e6312847cc9ce1e32d28 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Sat, 22 Jul 2000 00:15:30 +0000 Subject: [PATCH] 2000-07-21 Michael Snyder * thread.c (thread_apply_all_command): Update thread list first. --- gdb/ChangeLog | 2 ++ gdb/thread.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3350cfb8f14..635a334fa24 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -4,6 +4,8 @@ 2000-07-21 Michael Snyder + * thread.c (thread_apply_all_command): Update thread list first. + * printcmd.c (printf_command): Guard against 0-length string. * config/i386/tm-i386.h: treat PC and FP as unsigned. (SAVED_PC_AFTER_CALL): Use read_memory_unsigned_integer. (FRAME_SAVED_PC): Ditto. diff --git a/gdb/thread.c b/gdb/thread.c index 00c6467f254..a08ff175b5b 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -567,6 +567,10 @@ thread_apply_all_command (cmd, from_tty) old_chain = make_cleanup_restore_current_thread (inferior_pid); + /* It is safe to update the thread list now, before + traversing it for "thread apply all". MVS */ + target_find_new_threads (); + for (tp = thread_list; tp; tp = tp->next) if (thread_alive (tp)) { -- 2.30.2