From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YQhLNoH4N2CBPAAAWB0awg (envelope-from ) for ; Thu, 25 Feb 2021 14:20:33 -0500 Received: by simark.ca (Postfix, from userid 112) id CA8E81EF78; Thu, 25 Feb 2021 14:20:33 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=DKIM_SIGNED,MAILING_LIST_MULTI, RCVD_IN_BL_SPAMCOP_NET,RDNS_NONE,T_DKIM_INVALID,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 45B1D1E54D for ; Thu, 25 Feb 2021 14:20:33 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C3ECB3896832; Thu, 25 Feb 2021 19:20:32 +0000 (GMT) Received: from gateway32.websitewelcome.com (gateway32.websitewelcome.com [192.185.145.178]) by sourceware.org (Postfix) with ESMTPS id 8826B3894C37 for ; Thu, 25 Feb 2021 19:20:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8826B3894C37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway32.websitewelcome.com (Postfix) with ESMTP id C7CAC715A27 for ; Thu, 25 Feb 2021 13:20:28 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id FMBYlTDO1svw9FMBYlPEcM; Thu, 25 Feb 2021 13:20:28 -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=8uHYxZDNpWxMLyqtTniWhnLneGe+cKT8Y62cbv9ICWs=; b=ErXhCWxJG21PjF1dQXex1PbNw2 z3dMAJfoBRr1dRthADft+BzqGzhYWkOepq1amrzJvwoZirrriAxHTyxZRG+jkQo78xK7HFKb3loBm ECJHlR7I7EZkiYlZL7nC80rGb; Received: from 97-122-70-152.hlrn.qwest.net ([97.122.70.152]:50484 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lFMBY-0017cx-Az; Thu, 25 Feb 2021 12:20:28 -0700 From: Tom Tromey To: Simon Marchi via Gdb-patches Subject: Re: [PATCH 01/13] gdb/dwarf: change read_loclist_index complaints into errors References: <20210120053925.142862-1-simon.marchi@polymtl.ca> <20210120053925.142862-2-simon.marchi@polymtl.ca> <6d8498e3-8580-e537-d5b4-4dcb041bb7a9@amd.com> <4630fd66-61d9-319c-fc06-bf6e3f6fc34c@efficios.com> X-Attribution: Tom Date: Thu, 25 Feb 2021 12:20:27 -0700 In-Reply-To: <4630fd66-61d9-319c-fc06-bf6e3f6fc34c@efficios.com> (Simon Marchi via Gdb-patches's message of "Thu, 28 Jan 2021 10:42:11 -0500") Message-ID: <87y2fcvts4.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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.70.152 X-Source-L: No X-Exim-ID: 1lFMBY-0017cx-Az X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-70-152.hlrn.qwest.net (murgatroyd) [97.122.70.152]:50484 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes 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: , Cc: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" >> If this is the case, then considering the difference in usage between >> the two, having a wrong loclist information can still provide a >> correct line table information, but having a wrong rnglist >> information in my mind creates a more serious issue. >> On the other hand, how much can one trust in the information >> correctness if either of those are wrong. Simon> Indeed, `error` throws an exception that gets handled... I don't know Simon> where. If you are reading partial symtabs, it probably goes up to Simon> dwarf2_build_psymtabs, so it stops the processing for the whole object Simon> file. FWIW there is at least one bug open about this behavior. It's not completely clear what would be best. One idea I consider sometimes is to throw out just the known-bad CU, but try to read the remaining ones. This might not be too difficult to implement. Simon> I think it's correct from the read_rnglists_index and read_loclist_index Simon> functions point of view to throw if they encounter invalid data and Simon> can't return something meaningful. If we want to make error handling a Simon> bit more granular, we could catch the error in the caller Simon> (read_attribute_reprocess), make it display a complaint, and continue as Simon> if the attribute wasn't present. Things like this could be considered on a case-by-case basis as well. Simon> However, I don't intend to do this at the moment, because it would be Simon> quite a lot of work to do and test properly, in the end to accomodate an Simon> hypothetical buggy compiler. Maybe if/when we have a concrete instance Simon> of a widely available compiler producing such buggy debug info, we can Simon> revisit this idea. For the plan of just rejecting an individual bad CU, the problem isn't so much consistently bad compilers as that, when one does trip across bad DWARF, it makes the entire result unusable -- even if the bug is localized somehow. Tom