* strerror.c: Revert last change. Declare static sys_nerr
[deliverable/binutils-gdb.git] / gdb / sol-thread.c
index dbff6e26ce1b23edbf14bcdfa668fb8d3b1ccae1..72313dcb29c460b451af4928138a13b081f61442 100644 (file)
@@ -1,5 +1,5 @@
 /* Low level interface for debugging Solaris threads for GDB, the GNU debugger.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -62,6 +62,8 @@
 #include "regcache.h"
 #include "symfile.h"
 
+#include "gdb_string.h"
+
 extern struct target_ops sol_thread_ops;       /* Forward declaration */
 extern struct target_ops sol_core_ops; /* Forward declaration */
 
@@ -399,8 +401,6 @@ lwp_to_thread (ptid_t lwp)
 /* Most target vector functions from here on actually just pass through to
    procfs.c, as they don't need to do anything specific for threads.  */
 
-
-/* ARGSUSED */
 static void
 sol_thread_open (char *arg, int from_tty)
 {
@@ -646,10 +646,10 @@ sol_thread_store_registers (int regno)
 
   if (regno != -1)
     {                          /* Not writing all the regs */
-      /* save new register value */
-      char* old_value = (char*) alloca (REGISTER_SIZE);
-      memcpy (old_value, &deprecated_registers[REGISTER_BYTE (regno)],
-             REGISTER_SIZE);
+      char old_value[MAX_REGISTER_SIZE];
+      
+      /* Save new register value.  */
+      regcache_collect (regno, old_value);
 
       val = p_td_thr_getgregs (&thandle, gregset);
       if (val != TD_OK)
@@ -660,9 +660,8 @@ sol_thread_store_registers (int regno)
        error ("sol_thread_store_registers: td_thr_getfpregs %s",
               td_err_string (val));
 
-      /* restore new register value */
-      memcpy (&deprecated_registers[REGISTER_BYTE (regno)], old_value,
-             REGISTER_SIZE);
+      /* Restore new register value.  */
+      supply_register (regno, old_value);
 
 #if 0
 /* thread_db doesn't seem to handle this right */
@@ -1476,7 +1475,7 @@ info_cb (const td_thrhandle_t *th, void *s)
          struct minimal_symbol *msym;
          msym = lookup_minimal_symbol_by_pc (ti.ti_startfunc);
          if (msym)
-           printf_filtered ("   startfunc: %s\n", SYMBOL_NAME (msym));
+           printf_filtered ("   startfunc: %s\n", DEPRECATED_SYMBOL_NAME (msym));
          else
            printf_filtered ("   startfunc: 0x%s\n", paddr (ti.ti_startfunc));
        }
@@ -1487,7 +1486,7 @@ info_cb (const td_thrhandle_t *th, void *s)
          struct minimal_symbol *msym;
          msym = lookup_minimal_symbol_by_pc (ti.ti_pc);
          if (msym)
-           printf_filtered (" - Sleep func: %s\n", SYMBOL_NAME (msym));
+           printf_filtered (" - Sleep func: %s\n", DEPRECATED_SYMBOL_NAME (msym));
          else
            printf_filtered (" - Sleep func: 0x%s\n", paddr (ti.ti_startfunc));
        }
This page took 0.025119 seconds and 4 git commands to generate.