From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24818 invoked by alias); 29 Jul 2010 20:58:59 -0000 Received: (qmail 24793 invoked by uid 22791); 29 Jul 2010 20:58:58 -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, 29 Jul 2010 20:58:54 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6TKwrDm018472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 29 Jul 2010 16:58:53 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6TKwqO7011094; Thu, 29 Jul 2010 16:58:53 -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 o6TKwqeV004821; Thu, 29 Jul 2010 16:58:52 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id E12523797F9; Thu, 29 Jul 2010 14:58:51 -0600 (MDT) From: Tom Tromey To: sami wagiaalla Cc: gdb-patches@sourceware.org Subject: Re: [patch] Defer symbol addition until construction is complete References: <4C446F09.50107@redhat.com> Date: Thu, 29 Jul 2010 20:58:00 -0000 In-Reply-To: <4C446F09.50107@redhat.com> (sami wagiaalla's message of "Mon, 19 Jul 2010 11:28:09 -0400") 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-07/txt/msg00556.txt.bz2 >>>>> "Sami" == sami wagiaalla writes: Sami> In new_symbol adding the symbol to the pending symbol list is Sami> performed at various times and it is added to various lists making Sami> uniform treatment of of symbols at addition point difficult. This Sami> patch unifies the addition point and defers it to the end of Sami> construction. Looks quite reasonable. Sami> * dwarf2read.c (new_symbol): Add symbol to variable list at end of Sami> fucntion after symbol construction is complete. Typo: "function". Also you will need to rebase a little and s/new_symbol/new_symbol_full/ here. Sami> if (attr2 && (DW_UNSND (attr2) != 0)) Sami> { Sami> - struct pending **list_to_add; Sami> Sami> /* Workaround gfortran PR debug/40040 - it uses Remove the blank line as well. Sami> list_to_add = (cu->list_in_scope == &file_symbols Sami> && (cu->language == language_cplus Sami> || cu->language == language_java) Sami> ? &global_symbols : cu->list_in_scope); Sami> Sami> - add_symbol_to_list (sym, list_to_add); Here too. Ok with those changes. Tom