This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] gnu-nat.c


I sent this on June 11th, but it was never committed.  Could someone
please commit it?

2006-06-10  Alfred M. Szmidt  <ams@gnu.org>

	* gnu-nat.c: Undefine _process_user_ before including
	<hurd/process_request.h>.
	(gnu_resume): Supply missing argument to error().
	(gnu_read_inferior): Add extra parenthesis around arithmetic
	expression to silence warnings from GCC.
	(gnu_write_inferior): Likewise.
	(gnu_xfer_memory): Changed type of MYADDR to `gdb_byte *'.

Index: gnu-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-nat.c,v
retrieving revision 1.40
diff -u -r1.40 gnu-nat.c
--- gnu-nat.c  11 May 2006 19:37:52 -0000	1.40
+++ gnu-nat.c  10 Jun 2006 21:37:31 -0000
@@ -45,6 +45,9 @@
 #include <hurd/msg.h>
 #include <hurd/msg_request.h>
 #include <hurd/process.h>
+/* Defined by <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 @@
     {
       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);
     }
@@ -2257,7 +2260,7 @@
   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 +2315,7 @@
 
   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 +2448,8 @@
 /* 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)
 {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]