From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id C73F23846411 for ; Tue, 9 Feb 2021 07:33:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C73F23846411 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id ED2BAACB7; Tue, 9 Feb 2021 07:33:01 +0000 (UTC) Date: Tue, 9 Feb 2021 08:33:00 +0100 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com Subject: [committed] Bail out for unhandled dwarf-5 CU type Message-ID: <20210209073258.GA5513@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2021 07:33:03 -0000 Hi, With this exec: ... $ gcc -gdwarf-5 -fdebug-types-section hello.c ... we run into: ... $ dwz a.out dwz: a.out: DWARF CU type DW_UT_type unhandled dwz: a.out: Could not find DWARF abbreviation 8620 ... Remove the second message by bailing out of read_debug_info once the unhandled dwarf-5 CU type is encountered. Committed to trunk. Thanks, - Tom Bail out for unhandled dwarf-5 CU type 2021-02-09 Tom de Vries PR dwz/27372 * dwz.c (read_debug_info): Goto fail when encountering unhandled dwarf-5 CU type. --- dwz.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dwz.c b/dwz.c index 1c4ffbf..d6b9df0 100644 --- a/dwz.c +++ b/dwz.c @@ -6584,9 +6584,11 @@ read_debug_info (DSO *dso, int kind, unsigned int *die_count) { value = read_8 (ptr); if (value != DW_UT_compile && value != DW_UT_partial) - error (0, 0, "%s: DWARF CU type %s unhandled", dso->filename, - get_DW_UT_str (value)); - + { + error (0, 0, "%s: DWARF CU type %s unhandled", dso->filename, + get_DW_UT_str (value)); + goto fail; + } } else {