From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25518 invoked by alias); 5 Aug 2010 19:41:03 -0000 Received: (qmail 25507 invoked by uid 22791); 5 Aug 2010 19:41:02 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Aug 2010 19:40:57 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o75JeoJB025244 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 5 Aug 2010 15:40:50 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o75JenYK016097; Thu, 5 Aug 2010 15:40:49 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o75JemeK010296; Thu, 5 Aug 2010 15:40:49 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 56A523782ED; Thu, 5 Aug 2010 13:40:48 -0600 (MDT) From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFA] template names with arguments out of DW_AT_name References: <201007302017.41074.pedro@codesourcery.com> Date: Thu, 05 Aug 2010 19:41:00 -0000 In-Reply-To: <201007302017.41074.pedro@codesourcery.com> (Pedro Alves's message of "Fri, 30 Jul 2010 20:17:40 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2010-08/txt/msg00049.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> +/* Set during partial symbol reading, to prevent queueing of full Pedro> + symbols. */ Pedro> +static int reading_partial_symbols; Is there a particular reason for a new global? If not, I would prefer a field in dwarf2_per_objfile. There is plenty of room there, and I think it is a bit more understandable, plus friendlier for threading. Pedro> + /* If this is a template instantiation, we can not work out the Pedro> + template arguments from partial DIEs. So, unfortunately, we have Pedro> + to go through the full DIEs. At least any work we do building Pedro> + types here will be reused if full symbols are loaded later. */ I wonder whether this invalidates the multi-threading patches. I suspect it does not, but it is hard to be certain. Those patches relied on partial symbol reading using relatively few globals; full symbol reading uses more, and it isn't totally clear to me whether this code touches those or not. This doesn't affect this patch, I'm just wondering aloud. Pedro> + /* Specify decimal so that we do not depend on the radix. */ Pedro> + get_formatted_print_options (&opts, 'd'); I think you probably want to set the 'raw' field here. I don't think this will properly handle a DW_TAG_template_parameter that points to some other symbol. IIUC, this code will just print the address of the symbol, but it should actually print "&symbol". Tom