From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114615 invoked by alias); 23 May 2018 04:59:18 -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 114020 invoked by uid 89); 23 May 2018 04:59:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.45.95) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 May 2018 04:59:09 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway21.websitewelcome.com (Postfix) with ESMTP id F22B3400C9C2E for ; Tue, 22 May 2018 23:59:07 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id LLrffPMN8VTw5LLrffYpoM; Tue, 22 May 2018 23:59:07 -0500 X-Authority-Reason: nr=8 Received: from 174-29-44-154.hlrn.qwest.net ([174.29.44.154]:56108 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fLLrf-003S5D-OX; Tue, 22 May 2018 23:59:07 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 28/42] Set list_in_scope later in DWARF reader Date: Wed, 23 May 2018 04:59:00 -0000 Message-Id: <20180523045851.11660-29-tom@tromey.com> In-Reply-To: <20180523045851.11660-1-tom@tromey.com> References: <20180523045851.11660-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fLLrf-003S5D-OX X-Source-Sender: 174-29-44-154.hlrn.qwest.net (bapiya.Home) [174.29.44.154]:56108 X-Source-Auth: tom+tromey.com X-Email-Count: 29 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-05/txt/msg00590.txt.bz2 Currently the DWARF reader sets the list_in_scope member of the CU when first starting to process symbols. Future changes will make this assert -- code will not be able to refer to these lists until after start_symtab has been called. This patch prepares for the problem by arranging to initialize list_in_scope in dwarf2_start_symtab. gdb/ChangeLog 2018-05-22 Tom Tromey * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope. (process_full_type_unit): Likewise. (dwarf2_start_symtab): Set list_in_scope. --- gdb/ChangeLog | 6 ++++++ gdb/dwarf2read.c | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 3cc15ab645..f7cca01445 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -10281,8 +10281,6 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu, /* Clear the list here in case something was left over. */ cu->method_list.clear (); - cu->list_in_scope = &file_symbols; - cu->language = pretend_language; cu->language_defn = language_def (cu->language); @@ -10386,8 +10384,6 @@ process_full_type_unit (struct dwarf2_per_cu_data *per_cu, /* Clear the list here in case something was left over. */ cu->method_list.clear (); - cu->list_in_scope = &file_symbols; - cu->language = pretend_language; cu->language_defn = language_def (cu->language); @@ -21138,6 +21134,8 @@ dwarf2_start_symtab (struct dwarf2_cu *cu, = start_symtab (cu->per_cu->dwarf2_per_objfile->objfile, name, comp_dir, low_pc, cu->language); + cu->list_in_scope = get_file_symbols (); + record_debugformat ("DWARF 2"); record_producer (cu->producer); -- 2.13.6