From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3401 invoked by alias); 24 Oct 2013 20:31:24 -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 3387 invoked by uid 89); 24 Oct 2013 20:31:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS 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 ESMTP; Thu, 24 Oct 2013 20:31:23 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9OKVKZV008185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Oct 2013 16:31:21 -0400 Received: from barimba (ovpn-113-54.phx2.redhat.com [10.3.113.54]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r9OKVJDW009426 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 24 Oct 2013 16:31:20 -0400 From: Tom Tromey To: hex Cc: gdb-patches@sourceware.org Subject: Re: [PATCH]Add symbol whose field 'has_type' has been set to partial symbol table References: Date: Thu, 24 Oct 2013 20:31:00 -0000 In-Reply-To: (hex's message of "Thu, 24 Oct 2013 14:59:46 +0800") Message-ID: <874n869zs9.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-10/txt/msg00770.txt.bz2 >>>>> ">" == hex writes: >> // Then compile it with `gcc -g -c test.c`(For the lastest GCC, we >> need use 'gcc -g -O1 -c test.' to get the following DIE) >> We could see the DIE of 'var' is as following: >> <1><25>: Abbrev Number: 2 (DW_TAG_variable) >> <26> DW_AT_name : var >> <2a> DW_AT_decl_file : 1 >> <2b> DW_AT_decl_line : 1 >> <2c> DW_AT_type : <0x31> >> <30> DW_AT_const_value : 3 >> Latest GDB will not add it to partial symbol table because its symbol >> satisfies 'pdi->d.locdesc == NULL'. I think we need add it to partial >> symbol table. This patch seems reasonable to me, but I think it needs a test case. This should be easy to write using the DWARF assembler in the test suite. Tom