From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83728 invoked by alias); 15 May 2018 20:41:51 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 83716 invoked by uid 89); 15 May 2018 20:41:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=modernday, modern-day, gdwarf-2, H*Ad:D*t-online.de X-HELO: mailout11.t-online.de Received: from mailout11.t-online.de (HELO mailout11.t-online.de) (194.25.134.85) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 May 2018 20:41:47 +0000 Received: from fwd19.aul.t-online.de (fwd19.aul.t-online.de [172.20.27.65]) by mailout11.t-online.de (Postfix) with SMTP id 532B142619E6 for ; Tue, 15 May 2018 22:41:45 +0200 (CEST) Received: from [192.168.2.28] (SyLNkyZdohU2M4C8qhhDuFsv1F6AQk85Z7NlCzJqUcjvDPNULfFCns7iZzer7Hngc+@[91.59.2.117]) by fwd19.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1fIglM-2POELY0; Tue, 15 May 2018 22:41:36 +0200 Subject: Re: Defaulting to stabs debug output from AS Cygwin64 To: cygwin@cygwin.com References: <551ec1bb-60e2-2372-8e1a-f4cb839ae454@gmail.com> From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Message-ID: <068140eb-e8bf-c5a9-41e5-36120983cc9b@t-online.de> Date: Tue, 15 May 2018 21:18:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00205.txt.bz2 Am 15.05.2018 um 19:17 schrieb Michael Enright: > The GCC driver uses -gdwarf2 if you do 'gcc -g' on a .s file. Using > -gdwarf2 with assembly code manually or through gcc is successful in > producing a Cygwin64 executable that Cygwin64 GDB can work with. This > combination of circumstances led me to wonder how stabs was chosen for > Cygwin64. Basically because it was not chosen. It's not even actually supported, as evidenced by those relocation failures: not how those occurred in the .stab section. "The" default of Cygwin is whatever the compiler uses, i.e. Dwarf2, and was indeed chosen, because none of the older formats stand a chance of really handling the amount and complexity of debug information needed for modern-day C++. On to of that, making '-gdwarf-2' the default -g mode for 'as' would be an exercise in futility anyway, because that option is essentially a no-op. That's because Dwarf-2 debug information is _not_ actually created by the -g flag to begin with: it's spelled out by the compiler as reams of data and reloc statements, to go into specially named sections like '.debug_info'. GCC doesn't even pass any '-g' flag to the assembler in its default -gdwarf-2 mode. It makes sense that "as -g" equals "as -gstabs" because unlike the other ones, that one at least does something: it causes .def pseudo-ops to put data into the .stab section, which also is automatically created by that option. In a nutshell: you don't want to use either of "as -g" or "as -gstabs" -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple