* inferior.h (read_sp): Remove prototype.
[deliverable/binutils-gdb.git] / gdb / gnu-nat.c
index 968a9cf5f17abf410191ae6ffced3bffe4cf4346..80ceb9075ad5fb42e0d08370e0aa8e69806f4104 100644 (file)
@@ -1,5 +1,5 @@
 /* Interface GDB to the GNU Hurd.
-   Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2006
+   Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2006, 2007
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -45,6 +45,9 @@
 #include <hurd/msg.h>
 #include <hurd/msg_request.h>
 #include <hurd/process.h>
+/* Defined in <hurd/process.h>, but we need forward declarations from
+   <hurd/process_request.h> as well.  */
+#undef _process_user_
 #include <hurd/process_request.h>
 #include <hurd/signal.h>
 #include <hurd/sigpreempt.h>
@@ -1978,7 +1981,7 @@ gnu_resume (ptid_t tid, int step, enum target_signal sig)
     {
       struct proc *thread = inf_tid_to_thread (inf, PIDGET (tid));
       if (!thread)
-       error (_("Can't run single thread id %d: no such thread!"));
+       error (_("Can't run single thread id %d: no such thread!"), inf->pid);
       inf_debug (inf, "running one thread: %d/%d", inf->pid, thread->tid);
       inf_set_threads_resume_sc (inf, thread, 0);
     }
@@ -2204,11 +2207,8 @@ gnu_terminal_init_inferior (void)
    that registers contains all the registers from the program being
    debugged.  */
 static void
-gnu_prepare_to_store (void)
+gnu_prepare_to_store (struct regcache *regcache)
 {
-#ifdef CHILD_PREPARE_TO_STORE
-  CHILD_PREPARE_TO_STORE ();
-#endif
 }
 
 static void
@@ -2257,7 +2257,7 @@ gnu_read_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
   if (err)
     return 0;
 
-  err = hurd_safe_copyin (myaddr, (void *) addr - low_address + copied, length);
+  err = hurd_safe_copyin (myaddr, (void *) (addr - low_address + copied), length);
   if (err)
     {
       warning (_("Read from inferior faulted: %s"), safe_strerror (err));
@@ -2312,7 +2312,7 @@ gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
 
   deallocate++;
 
-  err = hurd_safe_copyout ((void *) addr - low_address + copied,
+  err = hurd_safe_copyout ((void *) (addr - low_address + copied),
                           myaddr, length);
   CHK_GOTO_OUT ("Write to inferior faulted", err);
 
@@ -2445,7 +2445,7 @@ out:
 /* Return 0 on failure, number of bytes handled otherwise.  TARGET
    is ignored. */
 static int
-gnu_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+gnu_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
                 struct mem_attrib *attrib,
                 struct target_ops *target)
 {
@@ -2581,8 +2581,8 @@ gnu_pid_to_str (ptid_t ptid)
 }
 
 \f
-extern void gnu_store_registers (int regno);
-extern void gnu_fetch_registers (int regno);
+extern void gnu_store_registers (struct regcache *regcache, int regno);
+extern void gnu_fetch_registers (struct regcache *regcache, int regno);
 
 struct target_ops gnu_ops;
 
This page took 0.025203 seconds and 4 git commands to generate.