From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2660 invoked by alias); 8 Aug 2005 12:28:05 -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 2562 invoked by uid 22791); 8 Aug 2005 12:27:42 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 08 Aug 2005 12:27:42 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j78CRfD2011994; Mon, 8 Aug 2005 08:27:41 -0400 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j78CReV06862; Mon, 8 Aug 2005 08:27:40 -0400 Received: from [172.31.0.98] (vpn83-138.boston.redhat.com [172.16.83.138]) by pobox.surrey.redhat.com (8.12.8/8.12.8) with ESMTP id j78CRZqh000978; Mon, 8 Aug 2005 13:27:38 +0100 Message-ID: <42F7512A.3060308@redhat.com> Date: Mon, 08 Aug 2005 12:28:00 -0000 From: Nick Clifton User-Agent: Thunderbird 1.0+ (X11/20050801) MIME-Version: 1.0 To: Rodney Brown CC: gdb-patches@sources.redhat.com, binutils@sources.redhat.com Subject: Re: Patch to bfd/aix5ppc-core.c for gdb-6.3 with gcc 4 on AIX5.1 References: <4F3B985B8E683C45B8C5F76B7AAB5AE5258A78@EXCHANGE.bravurasolutions.local> In-Reply-To: <4F3B985B8E683C45B8C5F76B7AAB5AE5258A78@EXCHANGE.bravurasolutions.local> Content-Type: multipart/mixed; boundary="------------050909010607030907050502" X-SW-Source: 2005-08/txt/msg00086.txt.bz2 This is a multi-part message in MIME format. --------------050909010607030907050502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 657 Hi Rodney, > Are you using a gcc 4.1 development compiler? Yes - but I am not compiling under AIX. I do not have access to an AIX5.1 system, so when I built a cross compiler the build system must have left out the core file support. Silly me. > I assumed that using the accessor macro was the preferred mechanism. It is, but when the macro is tied to a single particular function it really ought to be defined inside the function. That way if the code is ever rearranged it will not be lost. So - what do you think of the attached, simplified patch ? If it fixes the compile time warning then I would be happy to check it in. Cheers Nick --------------050909010607030907050502 Content-Type: text/plain; name="aix5.1ppc-core.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="aix5.1ppc-core.c.patch" Content-length: 1823 Index: bfd/aix5ppc-core.c =================================================================== RCS file: /cvs/src/src/bfd/aix5ppc-core.c,v retrieving revision 1.11 diff -c -3 -p -r1.11 aix5ppc-core.c *** bfd/aix5ppc-core.c 18 Jul 2005 14:13:33 -0000 1.11 --- bfd/aix5ppc-core.c 8 Aug 2005 12:24:45 -0000 *************** *** 1,5 **** /* IBM RS/6000 "XCOFF" back-end for BFD. ! Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by Tom Rix Contributed by Red Hat Inc. --- 1,5 ---- /* IBM RS/6000 "XCOFF" back-end for BFD. ! Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by Tom Rix Contributed by Red Hat Inc. *************** xcoff64_core_p (bfd *abfd) *** 55,61 **** bfd_vma ld_offset; bfd_size_type i; struct vm_infox vminfo; ! bfd_target *return_value = NULL; /* Get the header. */ if (bfd_seek (abfd, 0, SEEK_SET) != 0) --- 55,61 ---- bfd_vma ld_offset; bfd_size_type i; struct vm_infox vminfo; ! const bfd_target *return_value = NULL; /* Get the header. */ if (bfd_seek (abfd, 0, SEEK_SET) != 0) *************** xcoff64_core_p (bfd *abfd) *** 111,117 **** return return_value; memcpy (new_core_hdr, &core, sizeof (struct core_dumpxx)); ! core_hdr(abfd) = (char *)new_core_hdr; /* .stack section. */ sec = bfd_make_section_anyway (abfd, ".stack"); --- 111,120 ---- return return_value; memcpy (new_core_hdr, &core, sizeof (struct core_dumpxx)); ! /* The core_hdr() macro is not used here because it would be ! casting the LHS of an assignment and some versions of gcc ! will generate a warning for this. */ ! abfd->tdata.any = new_core_hdr; /* .stack section. */ sec = bfd_make_section_anyway (abfd, ".stack"); --------------050909010607030907050502--