From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27084 invoked by alias); 15 Jul 2005 09:17:40 -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 27065 invoked by uid 22791); 15 Jul 2005 09:17:34 -0000 Received: from [210.193.210.133] (HELO mx1.bravurasolutions.com.au) (210.193.210.133) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 15 Jul 2005 09:17:34 +0000 Content-class: urn:content-classes:message Subject: Patch to bfd/aix5ppc-core.c for gdb-6.3 with gcc 4 on AIX5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Jul 2005 09:17:00 -0000 Message-ID: <4F3B985B8E683C45B8C5F76B7AAB5AE5215F70@EXCHANGE.bravurasolutions.local> From: "Rodney Brown" To: Cc: X-SW-Source: 2005-07/txt/msg00131.txt.bz2 powerpc-ibm-aix5.1.0.0 gcc version 4.0.1 /bin/sh ./libtool --mode=3Dcompile gcc -DHAVE_CONFIG_H -I. -I../../gdb-6.3/bfd \ -I. -D_GNU_SOURCE -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE -DAIX_CORE \ -DAIX_WEAK_SUPPORT -I. -I../../gdb-6.3/bfd -I../../gdb-6.3/bfd/../include \ -I../../gdb-6.3/bfd/../intl -I../intl -W -Wall -Wstrict-prototypes \ -Wmissing-prototypes -g -O2 -c -o aix5ppc-core.lo \ ../../gdb-6.3/bfd/aix5ppc-core.c gcc -DHAVE_CONFIG_H -I. -I../../gdb-6.3/bfd -I. -D_GNU_SOURCE -DAIX_5_CORE \ -DAIX_CORE_DUMPX_CORE -DAIX_CORE -DAIX_WEAK_SUPPORT -I. -I../../gdb-6.3/bfd \ -I../../gdb-6.3/bfd/../include -I../../gdb-6.3/bfd/../intl -I../intl -W \ -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c \ ../../gdb-6.3/bfd/aix5ppc-core.c -o aix5ppc-core.o ../../gdb-6.3/bfd/aix5ppc-core.c: In function 'xcoff64_core_p': ../../gdb-6.3/bfd/aix5ppc-core.c:120: error: invalid lvalue in assignment ../../gdb-6.3/bfd/aix5ppc-core.c:223: warning: \ assignment discards qualifiers from pointer target type >From a look at aix5ppc-core.c with the CVSWeb interface, the patch for the return_value warning conflicts with the latest delta. Since xcoff64_core_p returns a const bfd_target *, I'd prefer declaring return_value as const. Diff for /src/bfd/aix5ppc-core.c between version 1.7 and 1.8 version 1.7, 2005/03/03 11:40:55 version 1.8, 2005/04/18 12:10:57 =20=09=20 - return_value =3D abfd->xvec; /* This is garbage for now. */ + return_value =3D (bfd_target *) abfd->xvec; /* This is garbage for now. */ No current employer disclaimer. No testsuite run. 2005-07-12 Rodney Brown * aix5ppc-core.c (core_hdr): #define as LHS varient. (xcoff64_core_p): Constify return_value variable. --- bfd/aix5ppc-core.c.orig Thu Jun 24 14:46:14 2004 +++ bfd/aix5ppc-core.c Tue Jul 12 00:37:16 2005 @@ -1,5 +1,5 @@ /* IBM RS/6000 "XCOFF" back-end for BFD. - Copyright 2001, 2002, 2004 + Copyright 2001, 2002, 2004, 2005 Free Software Foundation, Inc. Written by Tom Rix Contributed by Redhat. @@ -44,7 +44,7 @@ int xcoff64_core_file_failing_signal #include #include =20 -#define core_hdr(abfd) ((struct core_dumpxx *) abfd->tdata.any) +#define core_hdr(abfd) (abfd->tdata.any) /* gcc 4 support */ =20 #define CHECK_FILE_OFFSET(s, v) \ ((bfd_signed_vma)(v) < 0 || (bfd_signed_vma)(v) > (bfd_signed_vma)(s).st_size) @@ -60,7 +60,7 @@ xcoff64_core_p (abfd) bfd_vma ld_offset; bfd_size_type i; struct vm_infox vminfo; - bfd_target *return_value =3D NULL; + const bfd_target *return_value =3D NULL; =20 /* Get the header. */ if (bfd_seek (abfd, 0, SEEK_SET) !=3D 0) @@ -228,6 +228,9 @@ xcoff64_core_p (abfd) =20 return return_value; } + +#undef core_hdr /* gcc 4.0 support */ +#define core_hdr(abfd) ((struct core_dumpxx *) abfd->tdata.any) =20 /* Return `TRUE' if given core is from the given executable. */ =20