This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [regressions in GCC/libjava testsuite] Re: Patch to make bfd compile with -Wc++-compat
- From: Martin Thuresson <martin at mtme dot org>
- To: Matthias Klose <doko at ubuntu dot com>, Nick Clifton <nickc at redhat dot com>, Martin Thuresson <martin at mtme dot org>, binutils <binutils at sourceware dot org>, Tristan Gingold <gingold at adacore dot com>, GCC Java <java at gcc dot gnu dot org>
- Date: Wed, 30 Sep 2009 18:36:09 -0700
- Subject: Re: [regressions in GCC/libjava testsuite] Re: Patch to make bfd compile with -Wc++-compat
- 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> <624836f10909301745k5ffdcc77s1d8d0262093fc38c@mail.gmail.com>
On Wed, Sep 30, 2009 at 5:45 PM, Martin Thuresson <martin@mtme.org> wrote:
> 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.
"make check-binutils" passed on target x86_64-linux. My change
was just a mechanical change to avoid C++ warning, so I have
nothing against the bigger issue being fixed.
2009-09-30 Martin Thuresson <martin@mtme.org>
* binutils/addr2line.c (slurp_symtab): Fixed pointer bug.
> On Wed, Sep 30, 2009 at 5:20 PM, Martin Thuresson <martin@mtme.org> wrote:
>> On Wed, Sep 30, 2009 at 5:04 PM, Alan Modra <amodra@bigpond.net.au> 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. ?Try 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 ? ? ? ?2 Sep 2009 07:22:31 -0000 ? ? ? 1.33
>> +++ binutils/addr2line.c ? ? ? ?9 Sep 2009 23:01:26 -0000
>> @@ -102,13 +102,14 @@ slurp_symtab (bfd *abfd)
>> ?{
>> ? long symcount;
>> ? unsigned int size;
>> + ?void *minisyms = &syms;
>>
>> ? if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
>> ? ? return;
>>
>> - ?symcount = bfd_read_minisymbols (abfd, FALSE, (void *) &syms, &size);
>> + ?symcount = bfd_read_minisymbols (abfd, FALSE, &minisyms, &size);
>> ? if (symcount == 0)
>> - ? ?symcount = bfd_read_minisymbols (abfd, TRUE /* dynamic */, (void
>> *) &syms, &size);
>> + ? ?symcount = bfd_read_minisymbols (abfd, TRUE /* dynamic */,
>> &minisyms, &size);
>>
>> ? if (symcount < 0)
>> ? ? bfd_fatal (bfd_get_filename (abfd));
>>
>