From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16005 invoked by alias); 1 Oct 2009 00:46:23 -0000 Received: (qmail 15987 invoked by uid 22791); 1 Oct 2009 00:46:22 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f191.google.com (HELO mail-px0-f191.google.com) (209.85.216.191) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Oct 2009 00:46:17 +0000 Received: by pxi29 with SMTP id 29so7313377pxi.14 for ; Wed, 30 Sep 2009 17:46:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.115.24.10 with SMTP id b10mr845187waj.127.1254357975068; Wed, 30 Sep 2009 17:46:15 -0700 (PDT) In-Reply-To: <624836f10909301720u26dcf05eu684b54edd3315fd9@mail.gmail.com> References: <624836f10909071812q358c0ff8p34ce468ccadb50@mail.gmail.com> <624836f10909082138h1e14eb14j76d08ba0e4d76d0a@mail.gmail.com> <624836f10909082308p349131c5l103efc029e9e26e0@mail.gmail.com> <4AA820CB.3030403@redhat.com> <4AC3E34D.3080708@ubuntu.com> <4AC3E875.1010007@ubuntu.com> <20090930234835.GC18973@bubble.grove.modra.org> <20091001000428.GD18973@bubble.grove.modra.org> <624836f10909301720u26dcf05eu684b54edd3315fd9@mail.gmail.com> From: Martin Thuresson Date: Thu, 01 Oct 2009 00:46:00 -0000 Message-ID: <624836f10909301745k5ffdcc77s1d8d0262093fc38c@mail.gmail.com> Subject: Re: [regressions in GCC/libjava testsuite] Re: Patch to make bfd compile with -Wc++-compat To: Matthias Klose , Nick Clifton , Martin Thuresson , binutils , Tristan Gingold , GCC Java Content-Type: multipart/mixed; boundary=00163646b6128670410474d4f99f Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg00003.txt.bz2 --00163646b6128670410474d4f99f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 1960 Here is a patch that fixes a bug introduced with my patch. Im sorry for the first mistake. I was unable to run make check on my mac laptop, but will do it on my linux box in 30 min or so. Martin 2009-09-07 Martin Thuresson * binutils/addr2line.c (slurp_symtab): Fixed pointer bug. On Wed, Sep 30, 2009 at 5:20 PM, Martin Thuresson wrote: > On Wed, Sep 30, 2009 at 5:04 PM, Alan Modra wrote: >> On Thu, Oct 01, 2009 at 09:18:35AM +0930, Alan Modra wrote: >>> On Thu, Oct 01, 2009 at 01:23:33AM +0200, Matthias Klose wrote: >>> > It's the one applied to the binutils subdirectory. >>> >>> It is probably the addr2line.c change. =A0Try this: >> >> That's not the right patch, but does identify the breakage.. >> bfd_read_minisymbols ought to take a void * param instead of void **, >> I think. > > The issue in questions seems to be my patch from here: > http://sourceware.org/ml/binutils/2009-09/msg00276.html > > I cant recall why my change stopped the -Wc++-error. Ill take > a look and will submit a fix. > > Martin > > > Excerpt: > > diff -u -u -p -r1.33 addr2line.c > --- binutils/addr2line.c =A0 =A0 =A0 =A02 Sep 2009 07:22:31 -0000 =A0 =A0= =A0 1.33 > +++ binutils/addr2line.c =A0 =A0 =A0 =A09 Sep 2009 23:01:26 -0000 > @@ -102,13 +102,14 @@ slurp_symtab (bfd *abfd) > =A0{ > =A0 long symcount; > =A0 unsigned int size; > + =A0void *minisyms =3D &syms; > > =A0 if ((bfd_get_file_flags (abfd) & HAS_SYMS) =3D=3D 0) > =A0 =A0 return; > > - =A0symcount =3D bfd_read_minisymbols (abfd, FALSE, (void *) &syms, &siz= e); > + =A0symcount =3D bfd_read_minisymbols (abfd, FALSE, &minisyms, &size); > =A0 if (symcount =3D=3D 0) > - =A0 =A0symcount =3D bfd_read_minisymbols (abfd, TRUE /* dynamic */, (vo= id > *) &syms, &size); > + =A0 =A0symcount =3D bfd_read_minisymbols (abfd, TRUE /* dynamic */, > &minisyms, &size); > > =A0 if (symcount < 0) > =A0 =A0 bfd_fatal (bfd_get_filename (abfd)); > --00163646b6128670410474d4f99f Content-Type: text/plain; charset=US-ASCII; name="foo.patch.txt" Content-Disposition: attachment; filename="foo.patch.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g08s3gzg0 Content-length: 696 SW5kZXg6IGJpbnV0aWxzL2FkZHIybGluZS5jCj09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT0KUkNTIGZpbGU6IC9jdnMvc3JjL3NyYy9iaW51dGlscy9hZGRyMmxp bmUuYyx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4zNApkaWZmIC11IC1wIC1y MS4zNCBhZGRyMmxpbmUuYwotLS0gYmludXRpbHMvYWRkcjJsaW5lLmMJMTAg U2VwIDIwMDkgMTM6NDA6NDQgLTAwMDAJMS4zNAorKysgYmludXRpbHMvYWRk cjJsaW5lLmMJMSBPY3QgMjAwOSAwMDozODozMiAtMDAwMApAQCAtMTAyLDcg KzEwMiw3IEBAIHNsdXJwX3N5bXRhYiAoYmZkICphYmZkKQogewogICBsb25n IHN5bWNvdW50OwogICB1bnNpZ25lZCBpbnQgc2l6ZTsKLSAgdm9pZCAqbWlu aXN5bXMgPSAmc3ltczsKKyAgdm9pZCAqbWluaXN5bXMgPSBzeW1zOwogCiAg IGlmICgoYmZkX2dldF9maWxlX2ZsYWdzIChhYmZkKSAmIEhBU19TWU1TKSA9 PSAwKQogICAgIHJldHVybjsK --00163646b6128670410474d4f99f--