From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24937 invoked by alias); 19 Feb 2015 21:52: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 24912 invoked by uid 89); 19 Feb 2015 21:52:32 -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:52:31 +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 t1JLqN4l031314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Feb 2015 16:52:24 -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 t1JLqKL4023041 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 19 Feb 2015 16:52:23 -0500 From: Sergio Durigan Junior To: Cc: "Jose E. Marchesi" , 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> <87h9uhk4go.fsf@redhat.com> <1424382499.27855.130.camel@ubuntu-sellcey> X-URL: http://blog.sergiodj.net Date: Thu, 19 Feb 2015 21:52:00 -0000 In-Reply-To: <1424382499.27855.130.camel@ubuntu-sellcey> (Steve Ellcey's message of "Thu, 19 Feb 2015 13:48:19 -0800") Message-ID: <87bnkpin70.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/msg00558.txt.bz2 On Thursday, February 19 2015, Steve Ellcey wrote: > On Thu, 2015-02-19 at 15:53 -0500, Sergio Durigan Junior wrote: > >> > >> > This looks good to me. >> >> This is OK with a ChangeLog entry, and after you address Jose's request. > > OK, here is the patch (and ChangeLog) after I added a comment about > initializing arg.expr. I will go ahead and check it in later today. Thanks, Steve. Small nits below. > Steve Ellcey > sellcey@imgtec.com > > > 2015-02-19 Steve Ellcey > > * dtrace-probe.c (dtrace_process_dof_probe): Initialize arg.expr. > (dtrace_get_probes) Change dof type. I prefer "Change type of variable 'dof'". > > > diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c > index a6544ba..5b41e6b 100644 > --- a/gdb/dtrace-probe.c > +++ b/gdb/dtrace-probe.c > @@ -415,6 +415,9 @@ dtrace_process_dof_probe (struct objfile *objfile, > struct dtrace_probe_arg arg; > struct expression *expr; > > + /* Set arg.expr to ensure all fields in expr are initialized and > + the compiler will not warn when arg is used. */ > + arg.expr = NULL; > arg.type_str = xstrdup (p); > > /* Use strtab_size as a sentinel. */ > @@ -617,17 +620,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); This line is too long. Break it after "probesp,". > xfree (dof); > } > } OK with those changes. Thanks, -- Sergio GPG key ID: 0x65FC5E36 Please send encrypted e-mail if possible http://sergiodj.net/