From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13443 invoked by alias); 31 Aug 2005 19:04:18 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13420 invoked by uid 22791); 31 Aug 2005 19:04:12 -0000 Received: from w099.z064220152.sjc-ca.dsl.cnc.net (HELO duck.specifix.com) (64.220.152.99) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 31 Aug 2005 19:04:12 +0000 Received: from [127.0.0.1] (duck.corp.specifix.com [192.168.1.1]) by duck.specifix.com (Postfix) with ESMTP id 2E6FEFC4D for ; Wed, 31 Aug 2005 12:04:23 -0700 (PDT) Subject: [patch] fix gcc4 error for freebsd target From: James E Wilson To: gdb-patches@sourceware.org Content-Type: multipart/mixed; boundary="=-DJMuVn/cMxk2CYBA2g4J" Message-Id: <1125515044.21922.12.camel@aretha.corp.specifix.com> Mime-Version: 1.0 Date: Wed, 31 Aug 2005 19:37:00 -0000 X-SW-Source: 2005-08/txt/msg00266.txt.bz2 --=-DJMuVn/cMxk2CYBA2g4J Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-length: 718 On an i386-freebsd4.10 machine, using gcc-4.0.1 to compile gdb-6.3, I get a compiler error. The same problem still exists on gdb mainline. ../../gdb-6.3/gdb/i386fbsd-tdep.c:48: error: static declaration of ‘i386fbsd_sc_reg_offset’ follows non-static declaration ../../gdb-6.3/gdb/i386-tdep.h:190: error: previous declaration of ‘i386fbsd_sc_reg_offset’ was here The fix is trivial. We just need to delete the static keyword from the i386fbsd_sc_reg_offset definition in i386fbsd-tdep.c. I've attached the patch for gdb-6.3, which also applies with a small offset to mainline. OK for mainline? Do you want it on the gdb-6.3 branch also perhaps? -- Jim Wilson, GNU Tools Support, http://www.specifix.com --=-DJMuVn/cMxk2CYBA2g4J Content-Disposition: attachment; filename=patch.fbsd.static Content-Type: text/plain; name=patch.fbsd.static; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 897 2005-08-31 Jim Wilson * i386fbsd-nat.c (i386fbsd_sc_reg_offset): Make it non-static. Index: i386fbsd-tdep.c =================================================================== RCS file: /services/cvs/cvsroot/gnusense/gdb/gdb/i386fbsd-tdep.c,v retrieving revision 1.1.1.1 diff -p -r1.1.1.1 i386fbsd-tdep.c *** i386fbsd-tdep.c 8 Jul 2004 13:06:48 -0000 1.1.1.1 --- i386fbsd-tdep.c 31 Aug 2005 18:27:58 -0000 *************** CORE_ADDR i386fbsd_sigtramp_start_addr = *** 45,51 **** CORE_ADDR i386fbsd_sigtramp_end_addr = 0xbfbfdff0; /* From . */ ! static int i386fbsd_sc_reg_offset[] = { 8 + 14 * 4, /* %eax */ 8 + 13 * 4, /* %ecx */ --- 45,51 ---- CORE_ADDR i386fbsd_sigtramp_end_addr = 0xbfbfdff0; /* From . */ ! int i386fbsd_sc_reg_offset[] = { 8 + 14 * 4, /* %eax */ 8 + 13 * 4, /* %ecx */ --=-DJMuVn/cMxk2CYBA2g4J--