* breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
[deliverable/binutils-gdb.git] / gdb / thread.c
index 207687a84226aa24344e0504c5371531ea0f1882..fdc13bc9113289ab269c77084e616412f9daddaa 100644 (file)
@@ -28,6 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "value.h"
 #include "target.h"
 #include "thread.h"
+#include "command.h"
 
 #include <sys/types.h>
 #include <signal.h>
@@ -44,8 +45,6 @@ struct thread_info
 static struct thread_info *thread_list = NULL;
 static int highest_thread_num;
 
-static void thread_info PARAMS ((void));
-
 static void thread_command PARAMS ((char * tidstr, int from_tty));
 
 static void prune_threads PARAMS ((void));
@@ -76,7 +75,7 @@ add_thread (pid)
 {
   struct thread_info *tp;
 
-  tp = xmalloc (sizeof (struct thread_info));
+  tp = (struct thread_info *) xmalloc (sizeof (struct thread_info));
 
   tp->pid = pid;
   tp->num = ++highest_thread_num;
@@ -110,19 +109,6 @@ in_thread_list (pid)
   return 0;                    /* Never heard of 'im */
 }
 
-#if 0
-void
-bfd_get_core_threads (abfd)
-    bfd *abfd;
-{
-    int i;
-
-    inferior_pid = BUILDPID (inferior_pid, core_thread (abfd)->pid);
-    for (i = 0; i < core_pss (abfd).threadcnt; i++)
-      add_thread (core_thread (abfd)[i].pid);
-}
-#endif
-
 static void
 prune_threads ()
 {
@@ -159,7 +145,7 @@ info_threads_command (arg, from_tty)
       if (target_has_execution
          && kill (tp->pid, 0) == -1)
        {
-         tp->pid == -1;        /* Mark it as dead */
+         tp->pid = -1; /* Mark it as dead */
          continue;
        }
 
@@ -180,7 +166,7 @@ info_threads_command (arg, from_tty)
 
 /* Switch from one thread to another. */
 
-void
+static void
 thread_switch (pid)
      int pid;
 {
@@ -188,7 +174,6 @@ thread_switch (pid)
     return;
 
   inferior_pid = pid;
-  pc_changed = 0;
   flush_cached_frames ();
   registers_changed ();
   stop_pc = read_pc();
This page took 0.024176 seconds and 4 git commands to generate.