* exec.c (xfer_memory): Add attrib argument.
[deliverable/binutils-gdb.git] / gdb / sol-thread.c
index 3e5014e4acd8baba5119a3a414fef80a9ecb4d7f..be51710ffed912d7d07b74dd7e36cb441c565838 100644 (file)
@@ -217,7 +217,7 @@ td_err_string (td_err_e errcode)
     {TD_NOAPLIC, "Operation not applicable to"},
     {TD_NOTSD, "No thread specific data for this thread"},
     {TD_MALLOC, "Malloc failed"},
-    {TD_PARTIALREG, "Only part of register set was writen/read"},
+    {TD_PARTIALREG, "Only part of register set was written/read"},
     {TD_NOXREGS, "X register set not available for given thread"}
   };
   const int td_err_size = sizeof td_err_table / sizeof (struct string_map);
@@ -452,8 +452,10 @@ static void
 sol_thread_attach (char *args, int from_tty)
 {
   procfs_ops.to_attach (args, from_tty);
+
   /* Must get symbols from solibs before libthread_db can run! */
   SOLIB_ADD ((char *) 0, from_tty, (struct target_ops *) 0);
+
   if (sol_thread_active)
     {
       printf_filtered ("sol-thread active.\n");
@@ -752,13 +754,15 @@ sol_thread_prepare_to_store (void)
   procfs_ops.to_prepare_to_store ();
 }
 
+/* Transfer LEN bytes between GDB address MYADDR and target address
+   MEMADDR.  If DOWRITE is non-zero, transfer them to the target,
+   otherwise transfer them from the target.  TARGET is unused.
+
+   Returns the number of bytes transferred. */
+
 static int
-sol_thread_xfer_memory (memaddr, myaddr, len, dowrite, target)
-     CORE_ADDR memaddr;
-     char *myaddr;
-     int len;
-     int dowrite;
-     struct target_ops *target;        /* ignored */
+sol_thread_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int dowrite,
+                       struct target_ops *target)
 {
   int retval;
   struct cleanup *old_chain;
@@ -1048,7 +1052,7 @@ rw_common (int dowrite, const struct ps_prochandle *ph, gdb_ps_addr_t addr,
 #if defined (__sparcv9)
   /* For Sparc64 cross Sparc32, make sure the address has not been
      accidentally sign-extended (or whatever) to beyond 32 bits.  */
-  if (bfd_elf_get_arch_size (exec_bfd) == 32)
+  if (bfd_get_arch_size (exec_bfd) == 32)
     addr &= 0xffffffff;
 #endif
 
@@ -1309,6 +1313,7 @@ ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
   return PS_OK;
 }
 
+#ifdef PR_MODEL_LP64
 /* Identify process as 32-bit or 64-bit.
    At the moment I'm using bfd to do this.
    There might be a more solaris-specific (eg. procfs) method,
@@ -1318,15 +1323,15 @@ ps_err_e
 ps_pdmodel (gdb_ps_prochandle_t ph, int *data_model)
 {
   if (exec_bfd == 0)
-    return PS_ERR;
-
-  if (bfd_elf_get_arch_size (exec_bfd) == 32)
+    *data_model = PR_MODEL_UNKNOWN;
+  else if (bfd_get_arch_size (exec_bfd) == 32)
     *data_model = PR_MODEL_ILP32;
   else
     *data_model = PR_MODEL_LP64;
 
   return PS_OK;
 }
+#endif /* PR_MODEL_LP64 */
 
 #ifdef TM_I386SOL2_H
 
This page took 0.024204 seconds and 4 git commands to generate.