From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway30.websitewelcome.com (gateway30.websitewelcome.com [192.185.198.26]) by sourceware.org (Postfix) with ESMTPS id B547C385840E for ; Mon, 22 Nov 2021 20:00:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B547C385840E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tromey.com Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 5A0A033D59 for ; Mon, 22 Nov 2021 13:59:51 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id pFTjmLDGs17JKpFTjmwGdN; Mon, 22 Nov 2021 13:59:51 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=P+oM/CN3kHQTK7UlUh5fY5JkGo0ba6nqgtGRzAAI61k=; b=FJ9Hn8qhRUNQYv4dN0XmyVo7ht ogUapxlzTsQw3UKno2bcFAM7s6nHozSvwqkM4kw7U1nsnVGur9oDekgz5f+rEMXDE+XDhJ13fesSu bvV9cnXDBW7LuRgtdiql67hYj; Received: from 97-122-68-246.hlrn.qwest.net ([97.122.68.246]:40408 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mpFTj-002UVm-3a; Mon, 22 Nov 2021 12:59:51 -0700 From: Tom Tromey To: Tom Tromey Cc: Tom de Vries , gdb-patches@sourceware.org Subject: Re: [PATCH v2 00/32] Rewrite the DWARF "partial" reader References: <20211104180907.2360627-1-tom@tromey.com> <4a288a6a-63c4-e36e-da20-01ae3fd0955c@suse.de> <87a6i31woz.fsf@tromey.com> X-Attribution: Tom Date: Mon, 22 Nov 2021 12:59:49 -0700 In-Reply-To: <87a6i31woz.fsf@tromey.com> (Tom Tromey's message of "Tue, 16 Nov 2021 16:56:44 -0700") Message-ID: <87mtlwx8p6.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.68.246 X-Source-L: No X-Exim-ID: 1mpFTj-002UVm-3a X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-68-246.hlrn.qwest.net (localhost.localdomain) [97.122.68.246]:40408 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3025.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2021 20:00:12 -0000 Tom> I'll send v3 of the series once I do some more testing... I plan to Tom> regression test with a few different approaches (dwz, probably Tom> split DWARF too). I think the branch is regression free in the normal case and when using the cc-with-dwz-m board. I also tried the fission-dwp board, and I have a single regression. I'm inclined to ignore this one, but I figured I'd describe it first in case anyone wants to lobby for it to be fixed. First, the regression only affects one Ada test case, dgopt.exp, and only when using fission-dwp. In this scenario, the executable has a stub CU that looks like: <0><3f>: Abbrev Number: 1 (DW_TAG_compile_unit) [...] <50> DW_AT_stmt_list : 0x24d [...] <58> DW_AT_comp_dir : (indirect string, offset: 0x0): /home/tromey/gdb/build/gdb/testsuite/outputs/gdb.ada/dgopt Note there is no DW_AT_name. The corresponding .dwo file says: <0>: Abbrev Number: 1 (DW_TAG_compile_unit) [...] DW_AT_name : (indexed string: 0x1): /home/tromey/gdb/binutils-gdb/gdb/testsuite/gdb.ada/dgopt/x.adb DW_AT_comp_dir : (indexed string: 0x2): /home/tromey/gdb/build/gdb/testsuite/outputs/gdb.ada/dgopt That is, this has the correct file name in DW_AT_name. This is why the psymtab reader works -- the psymtab reader uses the line table, but also uses this name for file name matches. The line table does not mention x.adb, but instead: The File Name Table (offset 0x26a): Entry Dir Time Size Name 1 0 0 0 x.adb.dg That is, the file name table here holds the name of a file that's generated by the Ada compiler when run in a special mode. So, my inclination is to say that this is probably a compiler bug, or in any case an obscure oddity that gdb shouldn't bother with. To my knowledge, there aren't Ada users who also use Fission anyway. I do think this could be fixed. It would require maybe storing a file_and_directory in the dwarf2_per_cu_data. So if you think this is important, I'd probably refactor to take this approach. TBH I had expected this scenario to make a .gdb_index -- that's what fission-dwp is supposed to do, I think, via gold -- but this didn't happen. So possibly this is another oddity in the Ada toolchain, or maybe the gdb test suite. I'm not certain. Tom