2010-02-16 Sami Wagiaalla <swagiaal@redhat.com>
[deliverable/binutils-gdb.git] / gdb / sol-thread.c
index cf085f0c24317530aa73a524b6df1cfde7d991f2..3e7183f8ce41dc3891ec44992e3640235d44183f 100644 (file)
@@ -1,7 +1,7 @@
 /* Solaris threads debugging interface.
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2007, 2008, 2009 Free Software Foundation, Inc.
+   2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -65,8 +65,8 @@
 #include "solib.h"
 #include "symfile.h"
 #include "observer.h"
-
 #include "gdb_string.h"
+#include "procfs.h"
 
 struct target_ops sol_thread_ops;
 
@@ -381,7 +381,7 @@ sol_thread_resume (struct target_ops *ops,
 
 static ptid_t
 sol_thread_wait (struct target_ops *ops,
-                ptid_t ptid, struct target_waitstatus *ourstatus)
+                ptid_t ptid, struct target_waitstatus *ourstatus, int options)
 {
   ptid_t rtnval;
   ptid_t save_ptid;
@@ -407,7 +407,7 @@ sol_thread_wait (struct target_ops *ops,
                 GET_THREAD (save_ptid));
     }
 
-  rtnval = beneath->to_wait (beneath, ptid, ourstatus);
+  rtnval = beneath->to_wait (beneath, ptid, ourstatus, options);
 
   if (ourstatus->kind != TARGET_WAITKIND_EXITED)
     {
@@ -918,7 +918,7 @@ ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, prgregset_t gregset)
   old_chain = save_inferior_ptid ();
 
   inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
-  regcache = get_thread_regcache (inferior_ptid);
+  regcache = get_thread_arch_regcache (inferior_ptid, target_gdbarch);
 
   target_fetch_registers (regcache, -1);
   fill_gregset (regcache, (gdb_gregset_t *) gregset, -1);
@@ -940,7 +940,7 @@ ps_lsetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
   old_chain = save_inferior_ptid ();
 
   inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
-  regcache = get_thread_regcache (inferior_ptid);
+  regcache = get_thread_arch_regcache (inferior_ptid, target_gdbarch);
 
   supply_gregset (regcache, (const gdb_gregset_t *) gregset);
   target_store_registers (regcache, -1);
@@ -1048,7 +1048,7 @@ ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
   old_chain = save_inferior_ptid ();
 
   inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
-  regcache = get_thread_regcache (inferior_ptid);
+  regcache = get_thread_arch_regcache (inferior_ptid, target_gdbarch);
 
   target_fetch_registers (regcache, -1);
   fill_fpregset (regcache, (gdb_fpregset_t *) fpregset, -1);
@@ -1070,7 +1070,7 @@ ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
   old_chain = save_inferior_ptid ();
 
   inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
-  regcache = get_thread_regcache (inferior_ptid);
+  regcache = get_thread_arch_regcache (inferior_ptid, target_gdbarch);
 
   supply_fpregset (regcache, (const gdb_fpregset_t *) fpregset);
   target_store_registers (regcache, -1);
@@ -1250,7 +1250,8 @@ info_cb (const td_thrhandle_t *th, void *s)
            printf_filtered ("   startfunc: %s\n",
                             SYMBOL_PRINT_NAME (msym));
          else
-           printf_filtered ("   startfunc: 0x%s\n", paddr (ti.ti_startfunc));
+           printf_filtered ("   startfunc: %s\n",
+                            paddress (target_gdbarch, ti.ti_startfunc));
        }
 
       /* If thread is asleep, print function that went to sleep.  */
@@ -1262,7 +1263,8 @@ info_cb (const td_thrhandle_t *th, void *s)
            printf_filtered (" - Sleep func: %s\n",
                             SYMBOL_PRINT_NAME (msym));
          else
-           printf_filtered (" - Sleep func: 0x%s\n", paddr (ti.ti_startfunc));
+           printf_filtered (" - Sleep func: %s\n",
+                            paddress (target_gdbarch, ti.ti_startfunc));
        }
 
       /* Wrap up line, if necessary.  */
This page took 0.034183 seconds and 4 git commands to generate.