From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31496 invoked by alias); 10 Jun 2006 21:46:43 -0000 Received: (qmail 31476 invoked by uid 22791); 10 Jun 2006 21:46:41 -0000 X-Spam-Check-By: sourceware.org Received: from elvira.its.UU.SE (HELO elvira.ekonomikum.uu.se) (130.238.164.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 10 Jun 2006 21:46:04 +0000 Received: by elvira.ekonomikum.uu.se (Postfix, from userid 204) id 0FE26604; Sat, 10 Jun 2006 23:46:01 +0200 (MSZ) Received: from elvira.its.uu.se(127.0.0.1) by elvira.its.uu.se via virus-scan id s26661; Sat, 10 Jun 06 23:45:57 +0200 Received: from Psilocybe.Update.UU.SE (Psilocybe.Update.UU.SE [130.238.19.25]) by elvira.ekonomikum.uu.se (Postfix) with ESMTP id 0ED58600 for ; Sat, 10 Jun 2006 23:45:54 +0200 (MSZ) Received: by Psilocybe.Update.UU.SE (Postfix, from userid 30270) id DC67F44004; Sat, 10 Jun 2006 23:45:54 +0200 (CEST) From: "Alfred M. Szmidt" To: gdb-patches@sourceware.org Subject: Fix GNU build Reply-to: ams@gnu.org Message-Id: <20060610214554.DC67F44004@Psilocybe.Update.UU.SE> Date: Sat, 10 Jun 2006 21:46:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00131.txt.bz2 Hey, gdb changed how it handles warnings a while back, and the gnu-nat.c code hasn't really been maintained that well over the years so it caused some minor breakage there. Here is a patch that fixes all remaining errors and warnings. Is anyone maintaining the Hurdy bits in GDB? 2006-06-10 Alfred M. Szmidt * gnu-nat.c: Undefine _process_user_ before including . (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 #include #include +/* Defined by , but we need forward declarations from + as well, which the same name. */ +#undef _process_user_ #include #include #include @@ -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: 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) {