From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4871 invoked by alias); 26 Jan 2014 09:15:28 -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 4829 invoked by uid 89); 26 Jan 2014 09:15:22 -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,GARBLED_BODY autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 26 Jan 2014 09:15:21 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1W7LoD-0007LT-Er from Yao_Qi@mentor.com ; Sun, 26 Jan 2014 01:15:17 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 26 Jan 2014 01:15:17 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Sun, 26 Jan 2014 01:15:15 -0800 Message-ID: <52E4D1A5.10306@codesourcery.com> Date: Sun, 26 Jan 2014 09:15:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Jun Gong CC: Subject: Re: [PATCH]Add symbol whose field 'has_type' has been set to partial symbol table References: In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00968.txt.bz2 On 01/24/2014 02:19 PM, Jun Gong wrote: > This patch intends to add symbol whose field 'has_type' has been set > to partial symbol table. > > The patch and corresponding test case have been discussed and reviewed > before at https://sourceware.org/ml/gdb-patches/2013-10/msg00747.html > and https://sourceware.org/ml/gdb-patches/2013-11/msg00003.html. > However it has not been committed because Tom Tromey is very busy and > could not help commit it now. I have received copyright assignment. > Could you help review and commit the patch? Thank you! Thanks for submitting this patch. Patch itself looks simple, but doesn't meet some requirements for patch submission. In short, please have a look at https://sourceware.org/gdb/wiki/ContributionChecklist > > The following are the summary of the patch, and the attachment > const-var.exp is test case. > > 1. Change for gdb/ChangeLog > > 2014-01-24 Jun Gong > > * dwarf2read.c(add_partial_symbol): Add symbol whose field Each entry should be tab-prefixed. A space is missing before "(". > 'has_type' has been set to partial symbol table. Should be tab-prefixed. > > 2. Diff for dwarf2read.c > > diff -up gdb-7.7.50.20140124.orig/gdb/dwarf2read.c > gdb-7.7.50.20140124/gdb/dwarf2read.c > --- gdb-7.7.50.20140124.orig/gdb/dwarf2read.c 2014-01-24 > 13:04:04.169111566 +0800 > +++ gdb-7.7.50.20140124/gdb/dwarf2read.c 2014-01-24 13:26:48.445122774 +0800 > @@ -6769,8 +6769,9 @@ add_partial_symbol (struct partial_die_i > } > else > { > - /* Static Variable. Skip symbols without location descriptors. */ > - if (pdi->d.locdesc == NULL) > + /* Static Variable. Skip symbols without location descriptors. or > + has_type not set. */ The period after "descriptors" should be removed. It is better to say "Skip symbols without location descriptors or don't have type", or whatever "pdi->has_type == 0" stands for. > + if (pdi->d.locdesc == NULL && pdi->has_type == 0) pdi->has_type is a boolean to me, we can use "!pdi->has_type". > { > xfree (built_actual_name); > return; > > 3. Change for gdb/testsuite/Changelog > > 2014-01-24 Jun Gong > > * gdb.dwarf2/const-var.exp: New file. > > 4. Test case has been attached as const-var.exp. > Attaching a new file gets the review a little hard. Please generate a diff including your changes above and this new file. That is easier for people to review. Write the changelog in the e-mail together, gdb: 2014-01-24 Jun Gong * dwarf2read.c(add_partial_symbol): Add symbol whose field 'has_type' has been set to partial symbol table. gdb/testsuite: 2014-01-24 Jun Gong * gdb.dwarf2/const-var.exp: New file. and attach the patch including the changes in dwarf2read.c and new test cases in the e-mail. -- Yao (齐尧)