From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24920 invoked by alias); 19 Feb 2015 20:41:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 24907 invoked by uid 89); 19 Feb 2015 20:41:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: userp1040.oracle.com Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 19 Feb 2015 20:41:31 +0000 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t1JKfMmL022605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 19 Feb 2015 20:41:23 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t1JKfLQr005334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 19 Feb 2015 20:41:22 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t1JKfLe5005322; Thu, 19 Feb 2015 20:41:21 GMT Received: from termi.oracle.com (/10.175.252.152) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 Feb 2015 12:41:21 -0800 From: jose.marchesi@oracle.com (Jose E. Marchesi) To: Steve Ellcey Cc: Pedro Alves , Sergio Durigan Junior , Subject: Re: Build failure with probe patch References: <87wq3ercw0.fsf@redhat.com> <1424306916.27855.115.camel@ubuntu-sellcey> <87r3tl7uwz.fsf@oracle.com> <54E6150B.9060808@redhat.com> <87vbix3iqm.fsf@oracle.com> <1424368119.27855.123.camel@ubuntu-sellcey> Date: Thu, 19 Feb 2015 20:41:00 -0000 In-Reply-To: <1424368119.27855.123.camel@ubuntu-sellcey> (Steve Ellcey's message of "Thu, 19 Feb 2015 09:48:39 -0800") Message-ID: <87egply6gs.fsf@oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00554.txt.bz2 To fix this problem I changed dtrace_process_dof_probe to have 'arg.expr = NULL' in the loop that stores argument descriptions. Here is a complete patch that compiled for me using the old GCC. Ah! But the warning seems all misplaced, isnt it? Weird... :D diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c index a6544ba..fd6ae6e 100644 --- a/gdb/dtrace-probe.c +++ b/gdb/dtrace-probe.c @@ -415,6 +415,7 @@ dtrace_process_dof_probe (struct objfile *objfile, struct dtrace_probe_arg arg; struct expression *expr; + arg.expr = NULL; I would add a comment explaining why that sentence is necessary, as it is not obvious at all to the casual reader. arg.type_str = xstrdup (p); /* Use strtab_size as a sentinel. */ @@ -617,17 +618,17 @@ dtrace_get_probes (VEC (probe_p) **probesp, struct objfile *objfile) { if (elf_section_data (sect)->this_hdr.sh_type == SHT_SUNW_dof) { - struct dtrace_dof_hdr *dof; + bfd_byte *dof; /* Read the contents of the DOF section and then process it to extract the information of any probe defined into it. */ - if (!bfd_malloc_and_get_section (abfd, sect, (bfd_byte **) &dof)) + if (!bfd_malloc_and_get_section (abfd, sect, &dof)) complaint (&symfile_complaints, _("could not obtain the contents of" "section '%s' in objfile `%s'."), sect->name, abfd->filename); - dtrace_process_dof (sect, objfile, probesp, dof); + dtrace_process_dof (sect, objfile, probesp, (struct dtrace_dof_hdr *) dof); xfree (dof); } } This looks good to me.