* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop
[deliverable/binutils-gdb.git] / gdb / sol-thread.c
index bd4f1b2a068ec1982ce29b45afe5649c91103e56..ab7ec5d2244ecad71f9a98be941f941cb68053ba 100644 (file)
@@ -1,7 +1,7 @@
 /* Solaris threads debugging interface.
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2007 Free Software Foundation, Inc.
+   2007, 2008 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -461,10 +461,7 @@ sol_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
       if (is_thread (rtnval)
          && !ptid_equal (rtnval, save_ptid)
          && !in_thread_list (rtnval))
-       {
-         printf_filtered ("[New %s]\n", target_pid_to_str (rtnval));
-         add_thread (rtnval);
-       }
+       add_thread (rtnval);
     }
 
   /* During process initialization, we may get here without the thread
@@ -484,6 +481,9 @@ sol_thread_fetch_registers (struct regcache *regcache, int regnum)
   td_err_e val;
   prgregset_t gregset;
   prfpregset_t fpregset;
+  gdb_gregset_t *gregset_p = &gregset;
+  gdb_fpregset_t *fpregset_p = &fpregset;
+
 #if 0
   int xregsize;
   caddr_t xregset;
@@ -530,8 +530,8 @@ sol_thread_fetch_registers (struct regcache *regcache, int regnum)
      calling the td routines because the td routines call ps_lget*
      which affect the values stored in the registers array.  */
 
-  supply_gregset (regcache, (const gdb_gregset_t *) &gregset);
-  supply_fpregset (regcache, (const gdb_fpregset_t *) &fpregset);
+  supply_gregset (regcache, (const gdb_gregset_t *) gregset_p);
+  supply_fpregset (regcache, (const gdb_fpregset_t *) fpregset_p);
 
 #if 0
   /* FIXME: libthread_db doesn't seem to handle this right.  */
@@ -881,9 +881,9 @@ sol_thread_alive (ptid_t ptid)
 }
 
 static void
-sol_thread_stop (void)
+sol_thread_stop (ptid_t ptid)
 {
-  procfs_ops.to_stop ();
+  procfs_ops.to_stop (ptid);
 }
 \f
 /* These routines implement the lower half of the thread_db interface,
@@ -1283,9 +1283,12 @@ ps_pdmodel (gdb_ps_prochandle_t ph, int *data_model)
 }
 #endif /* PR_MODEL_LP64 */
 
-#ifdef TM_I386SOL2_H
+#if (defined(__i386__) || defined(__x86_64__)) && defined (sun)
 
-/* Reads the local descriptor table of a LWP.  */
+/* Reads the local descriptor table of a LWP.
+
+   This function is necessary on x86-solaris only.  Without it, the loading
+   of libthread_db would fail because of ps_lgetLDT being undefined.  */
 
 ps_err_e
 ps_lgetLDT (gdb_ps_prochandle_t ph, lwpid_t lwpid,
@@ -1311,7 +1314,7 @@ ps_lgetLDT (gdb_ps_prochandle_t ph, lwpid_t lwpid,
     /* LDT not found.  */
     return PS_ERR;
 }
-#endif /* TM_I386SOL2_H */
+#endif
 \f
 
 /* Convert PTID to printable form.  */
This page took 0.02495 seconds and 4 git commands to generate.