From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81108 invoked by alias); 17 May 2018 16:19:41 -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 81093 invoked by uid 89); 17 May 2018 16:19:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Keith, Seitz, seitz, keith X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.146.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 May 2018 16:19:39 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway33.websitewelcome.com (Postfix) with ESMTP id A5FD3C0D49D for ; Thu, 17 May 2018 11:19:37 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id JLcvfPQxXlAdrJLcvfvODP; Thu, 17 May 2018 11:19:37 -0500 X-Authority-Reason: nr=8 Received: from 174-29-44-154.hlrn.qwest.net ([174.29.44.154]:48658 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fJLcv-002uxI-EW; Thu, 17 May 2018 11:19:37 -0500 From: Tom Tromey To: Keith Seitz Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: possible fix for PR symtab/23010 References: <87po34kzxh.fsf@tromey.com> Date: Thu, 17 May 2018 17:16:00 -0000 In-Reply-To: (Keith Seitz's message of "Tue, 17 Apr 2018 12:17:00 -0700") Message-ID: <87a7sygspz.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fJLcv-002uxI-EW X-Source-Sender: 174-29-44-154.hlrn.qwest.net (pokyo) [174.29.44.154]:48658 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-05/txt/msg00384.txt.bz2 >>>>> "Keith" == Keith Seitz writes: Keith> This patch looks reasonable to me, but I would ask you to consider Keith> mentioning why partial_units are skipped where they are (even if to Keith> just reference the problem or bug?). That's these two hunks, I think: >> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c >> index e3f544a6a4..406aa0d52e 100644 >> --- a/gdb/dwarf2read.c >> +++ b/gdb/dwarf2read.c >> @@ -2870,7 +2870,7 @@ dw2_do_instantiate_symtab (struct dwarf2_per_cu_data *per_cu) >> : (per_cu->v.psymtab == NULL || !per_cu->v.psymtab->readin)) >> { >> queue_comp_unit (per_cu, language_minimal); >> - load_cu (per_cu); >> + load_cu (per_cu, true); >> >> /* If we just loaded a CU from a DWO, and we're working with an index >> that may badly handle TUs, load all the TUs in that DWO as well. This use of "true" actually seems weird to me on re-reading. dw2_do_instantiate_symtab doesn't actually use the skip_partial parameter I added. So, I changed this to pass skip_partial to load_cu. I verified that the -readnow test on libwebkit2gtk still works. >> @@ -4144,7 +4144,7 @@ dw2_expand_all_symtabs (struct objfile *objfile) >> { >> dwarf2_per_cu_data *per_cu = dwarf2_per_objfile->get_cutu (i); >> >> - dw2_instantiate_symtab (per_cu); >> + dw2_instantiate_symtab (per_cu, true); >> } >> } >> Here I added this comment: /* We don't want to directly expand a partial CU, because if we read it with the wrong language, then assertion failures can be triggered later on. See PR symtab/23010. So, tell dw2_instantiate_symtab to skip partial CUs -- any important partial CU will be read via DW_TAG_imported_unit anyway. */ I looked at your test case a bit but I also couldn't make it fail. I'm pushing this patch in now. Tom