From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 43AB5385DC2E for ; Mon, 30 Nov 2020 20:26:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 43AB5385DC2E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from librem (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id D93BC37251C8; Mon, 30 Nov 2020 21:26:48 +0100 (CET) Received: by librem (Postfix, from userid 1000) id 4E765C3747; Mon, 30 Nov 2020 21:25:50 +0100 (CET) Date: Mon, 30 Nov 2020 21:25:50 +0100 From: Mark Wielaard To: Alexander Yermolovich Cc: David Blaikie , Richard Biener , Jakub Jelinek , "gcc@gcc.gnu.org" , "maskray@google.com" Subject: Re: DWARF64 gcc/clang flag discussion Message-ID: <20201130202550.GC3019@wildebeest.org> References: <20201124074505.GL3788@tucnak> <2bbab27b8cba9e1938adf6498f1fb1ced9acbd06.camel@klomp.org> <20201124111118.GS3788@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2020 20:26:51 -0000 On Mon, Nov 30, 2020 at 07:35:36PM +0000, Alexander Yermolovich via Gcc wrote: > I guess discussion is from perspective of having both flags > gdwarf32/gdwarf64. In which case it's a valid question on whether > they should imply -g like -gdwarf-#. But can this be viewed as only > a -gdwarf64 flag, that is a qualifier to other debug flags that > enable debug information? DWARF spec says that 32bit should be a > default, and 64bit should be used rarely (paraphrasing). So when > user enabled debug information the default expectation is that it > will be 32bit. There is no real need for a flag to say "I want debug > information, and I want it 32bit". On the other hand, 64bit DWARF > format must be enabled. So from users perspective it's "I want debug > information enabled for particular DWARF version and level, oh and I > want it to be 64bit". GCC already support DWARF64 because some gcc architectures already default to DWARF64. They #define DWARF_OFFSET_SIZE PTR_SIZE. We currently don't have an option to use DWARF32 for those arches. -gdwarf32 would be that flag. And in general I think you want composable command line flags where a later flag can override an earlier flag. Cheers, Mark