Fix up some formatting.
[deliverable/binutils-gdb.git] / gdb / sol-thread.c
index 8f99ac1627dde1eb9867a3a8ddb89c6e0369f810..ade49f0b1a6490266f8a58029043a5f0e83cce49 100644 (file)
@@ -1,7 +1,7 @@
 /* Solaris threads debugging interface.
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -80,7 +80,7 @@ struct target_ops sol_core_ops;
 extern int procfs_suppress_run;
 extern struct target_ops procfs_ops;   /* target vector for procfs.c */
 extern struct target_ops core_ops;     /* target vector for corelow.c */
-extern char *procfs_pid_to_str (ptid_t ptid);
+extern char *procfs_pid_to_str (struct target_ops *ops, ptid_t ptid);
 
 /* Prototypes for supply_gregset etc. */
 #include "gregset.h"
@@ -348,10 +348,10 @@ sol_thread_open (char *arg, int from_tty)
    for the trace-trap that results from attaching.  */
 
 static void
-sol_thread_attach (char *args, int from_tty)
+sol_thread_attach (struct target_ops *ops, char *args, int from_tty)
 {
   sol_thread_active = 0;
-  procfs_ops.to_attach (args, from_tty);
+  procfs_ops.to_attach (&procfs_ops, args, from_tty);
 
   /* Must get symbols from shared libraries before libthread_db can run!  */
   solib_add (NULL, from_tty, (struct target_ops *) 0, auto_solib_add);
@@ -379,12 +379,12 @@ sol_thread_attach (char *args, int from_tty)
    program was started via the normal ptrace (PTRACE_TRACEME).  */
 
 static void
-sol_thread_detach (char *args, int from_tty)
+sol_thread_detach (struct target_ops *ops, char *args, int from_tty)
 {
   sol_thread_active = 0;
   inferior_ptid = pid_to_ptid (PIDGET (main_ph.ptid));
   unpush_target (&sol_thread_ops);
-  procfs_ops.to_detach (args, from_tty);
+  procfs_ops.to_detach (&procfs_ops, args, from_tty);
 }
 
 /* Resume execution of process PTID.  If STEP is nozero, then just
@@ -424,7 +424,8 @@ sol_thread_resume (ptid_t ptid, int step, enum target_signal signo)
    thread ID to an LWP ID, and vice versa on the way out.  */
 
 static ptid_t
-sol_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+sol_thread_wait (struct target_ops *ops,
+                ptid_t ptid, struct target_waitstatus *ourstatus)
 {
   ptid_t rtnval;
   ptid_t save_ptid;
@@ -449,7 +450,7 @@ sol_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
                 GET_THREAD (save_ptid));
     }
 
-  rtnval = procfs_ops.to_wait (ptid, ourstatus);
+  rtnval = procfs_ops.to_wait (&procfs_ops, ptid, ourstatus);
 
   if (ourstatus->kind != TARGET_WAITKIND_EXITED)
     {
@@ -753,11 +754,11 @@ sol_thread_notice_signals (ptid_t ptid)
 /* Fork an inferior process, and start debugging it with /proc.  */
 
 static void
-sol_thread_create_inferior (char *exec_file, char *allargs, char **env,
-                           int from_tty)
+sol_thread_create_inferior (struct target_ops *ops, char *exec_file,
+                           char *allargs, char **env, int from_tty)
 {
   sol_thread_active = 0;
-  procfs_ops.to_create_inferior (exec_file, allargs, env, from_tty);
+  procfs_ops.to_create_inferior (&procfs_ops, exec_file, allargs, env, from_tty);
 
   if (sol_thread_active && !ptid_equal (inferior_ptid, null_ptid))
     {
@@ -822,11 +823,11 @@ sol_thread_new_objfile (struct objfile *objfile)
 /* Clean up after the inferior dies.  */
 
 static void
-sol_thread_mourn_inferior (void)
+sol_thread_mourn_inferior (struct target_ops *ops)
 {
   sol_thread_active = 0;
   unpush_target (&sol_thread_ops);
-  procfs_ops.to_mourn_inferior ();
+  procfs_ops.to_mourn_inferior (&procfs_ops);
 }
 
 /* Mark our target-struct as eligible for stray "run" and "attach"
@@ -1323,13 +1324,13 @@ ps_lgetLDT (gdb_ps_prochandle_t ph, lwpid_t lwpid,
 /* Convert PTID to printable form.  */
 
 char *
-solaris_pid_to_str (ptid_t ptid)
+solaris_pid_to_str (struct target_ops *ops, ptid_t ptid)
 {
   static char buf[100];
 
   /* In case init failed to resolve the libthread_db library.  */
   if (!procfs_suppress_run)
-    return procfs_pid_to_str (ptid);
+    return procfs_pid_to_str (&procfs_ops, ptid);
 
   if (is_thread (ptid))
     {
@@ -1411,10 +1412,10 @@ sol_core_close (int quitting)
 }
 
 static void
-sol_core_detach (char *args, int from_tty)
+sol_core_detach (struct target_ops *ops, char *args, int from_tty)
 {
   unpush_target (&core_ops);
-  orig_core_ops.to_detach (args, from_tty);
+  orig_core_ops.to_detach (&orig_core_ops, args, from_tty);
 }
 
 static void
This page took 0.025441 seconds and 4 git commands to generate.