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 487793858024 for ; Sun, 14 Feb 2021 08:06:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 487793858024 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 65BFCADF0; Sun, 14 Feb 2021 08:06:50 +0000 (UTC) Date: Sun, 14 Feb 2021 09:06:48 +0100 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com Subject: [committed] Support DW_LANG_C_plus_plus_{03,11,14} Message-ID: <20210214080647.GA8986@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: Sun, 14 Feb 2021 08:06:52 -0000 Hi, When compiling with f.i. g++ 7.5.0, we have GNU C++14 by default: ... DW_AT_producer: GNU C++14 7.5.0 -mtune=generic -march=x86-64 -g ... and the corresponding language setting is: ... DW_AT_language: 4 (C++) ... However, with -gdwarf-5, we have instead: ... DW_AT_producer: GNU C++14 7.5.0 -mtune=generic -march=x86-64 -gdwarf-5 DW_AT_language: 33 (C++14) ... The current checks in dwz (for --odr and --devel-gen-cu) for language C++ compare only with DW_LANG_C_plus_plus. Fix this by comparing in addition with DW_LANG_C_plus_plus_{03,11,14}. Committed to trunk. Thanks, - Tom Support DW_LANG_C_plus_plus_{03,11,14} 2021-02-14 Tom de Vries * dwz.c (set_die_odr_state, partition_lang): Add support for DW_LANG_C_plus_plus_{03,11,14}. --- dwz.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dwz.c b/dwz.c index d6b9df0..992da77 100644 --- a/dwz.c +++ b/dwz.c @@ -3240,6 +3240,9 @@ set_die_odr_state (dw_cu_ref cu, dw_die_ref die) switch (cu->lang) { case DW_LANG_C_plus_plus: + case DW_LANG_C_plus_plus_03: + case DW_LANG_C_plus_plus_11: + case DW_LANG_C_plus_plus_14: /* c++ defines one-definition-rule. */ if (die->die_tag == DW_TAG_structure_type || die->die_tag == DW_TAG_class_type @@ -7745,6 +7748,9 @@ partition_lang (dw_die_ref die) switch (lang) { case DW_LANG_C_plus_plus: + case DW_LANG_C_plus_plus_03: + case DW_LANG_C_plus_plus_11: + case DW_LANG_C_plus_plus_14: break; default: return 0;