From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14805 invoked by alias); 19 Feb 2015 21:18:27 -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 14796 invoked by uid 89); 19 Feb 2015 21:18:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 19 Feb 2015 21:18:26 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1JLIGXH000988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Feb 2015 16:18:16 -0500 Received: from localhost (dhcp-10-15-16-169.yyz.redhat.com [10.15.16.169]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1JKrxoL019346 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 19 Feb 2015 15:54:00 -0500 From: Sergio Durigan Junior To: jose.marchesi@oracle.com (Jose E. Marchesi) Cc: Steve Ellcey , Pedro Alves , 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> <87egply6gs.fsf@oracle.com> X-URL: http://blog.sergiodj.net Date: Thu, 19 Feb 2015 21:18:00 -0000 Message-ID: <87h9uhk4go.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00556.txt.bz2 Hi Steve, Thanks for the patch. And thanks Jose and Pedro taking care of this. On Thursday, February 19 2015, Jose E. Marchesi wrote: > 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 Totally :-). > 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. Agreed. > 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. This is OK with a ChangeLog entry, and after you address Jose's request. -- Sergio GPG key ID: 0x65FC5E36 Please send encrypted e-mail if possible http://sergiodj.net/