This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH]: Update thread list


I can think of two times when it is both safe and useful 
for GDB to go query the target to find out if there are 
any new threads.
 1) "info threads" and
 2) "thread apply all xxx"

This change adds the second (the first is already in place).

2000-07-21  Michael Snyder  <msnyder@cleaver.cygnus.com>

        * thread.c (thread_apply_all_command): Update thread list first.

diff -p -r1.4 thread.c
*** thread.c    2000/07/19 21:03:06     1.4
--- thread.c    2000/07/22 00:14:42
*************** thread_apply_all_command (cmd, from_tty)
*** 567,572 ****
--- 567,576 ----
  
    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))
        {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]