* stabsread.c (get_substring): Declare second arg as int.
[deliverable/binutils-gdb.git] / gdb / thread.c
index 2e892742f18b7704a9c820c14101139b981b6b86..2d1826a46a588ca3ce5eac88e20809551f6d8215 100644 (file)
@@ -18,7 +18,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include "symtab.h"
@@ -27,7 +27,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "environ.h"
 #include "value.h"
 #include "target.h"
-#include "thread.h"
+#include "gdbthread.h"
 #include "command.h"
 #include "gdbcmd.h"
 
@@ -58,13 +58,29 @@ struct thread_info
 static struct thread_info *thread_list = NULL;
 static int highest_thread_num;
 
-static void thread_command PARAMS ((char * tidstr, int from_tty));
+static void
+thread_command PARAMS ((char * tidstr, int from_tty));
+
+static void
+prune_threads PARAMS ((void));
+
+static void
+thread_switch PARAMS ((int pid));
+
+static struct thread_info *
+find_thread_id PARAMS ((int num));
+
+static void
+info_threads_command PARAMS ((char *, int));
 
-static void prune_threads PARAMS ((void));
+static void
+restore_current_thread PARAMS ((int));
 
-static void thread_switch PARAMS ((int pid));
+static void
+thread_apply_all_command PARAMS ((char *, int));
 
-static struct thread_info * find_thread_id PARAMS ((int num));
+static void
+thread_apply_command PARAMS ((char *, int));
 
 void
 init_thread_list ()
@@ -280,12 +296,7 @@ info_threads_command (arg, from_tty)
 
   for (tp = thread_list; tp; tp = tp->next)
     {
-      /* FIXME: need to figure out a way to do this for remote too,
-        or else the print_stack_frame below will fail with a bogus
-        thread ID.  */
-      if (!STREQ (current_target.to_shortname, "remote")
-         && target_has_execution
-         && kill (tp->pid, 0) == -1)
+      if (! target_thread_alive (tp->pid))
        {
          tp->pid = -1; /* Mark it as dead */
          continue;
This page took 0.024168 seconds and 4 git commands to generate.