diff options
author | Alfred M. Szmidt <ams@gnu.org> | 2006-07-16 09:57:02 +0000 |
---|---|---|
committer | Alfred M. Szmidt <ams@gnu.org> | 2006-07-16 09:57:02 +0000 |
commit | 96ffcb620f34d93e29497b4f79609faecf5133b4 (patch) | |
tree | 0cc9150c89609b8f8ef959431c7faf389797b564 /gdb | |
parent | 7f37c0108268b1fd4274f6efc5ef0de1fa5aa5f7 (diff) | |
download | gdb-96ffcb620f34d93e29497b4f79609faecf5133b4.zip gdb-96ffcb620f34d93e29497b4f79609faecf5133b4.tar.gz gdb-96ffcb620f34d93e29497b4f79609faecf5133b4.tar.bz2 |
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 *'.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/gnu-nat.c | 11 |
2 files changed, 17 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e12252e..eaed9f4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2006-07-16 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 *'. + 2006-07-16 Mark Kettenis <kettenis@gnu.org> * armnbsd-tdep.c (arm_netbsd_elf_init_abi): Use diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 968a9cf..b626dfb 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -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); } @@ -2257,7 +2260,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 +2315,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 +2448,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) { |