X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=ilwq+DZgo4xn+zKg Ne57NacVrdIhCL4Wt/F5HlHItZHGe4WX/+tGaAww91Hrp4cnkFvxvzRs+Q6xLgjw nqkWxCODg2X+7pWq4s4at9JIbItSvyH7Gazasx7D8AL+OvnhOZKMuD/STq/C9Y8B O3LUJ8Vm9u1djPm0v9bnn51kYtA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=+ZnmmqQFiAU4CTb33+h2mR Kf/bc=; b=ntwdBgm0PqMRkf07++6sN+Z9GD6y45mJcIRve5gFvab21lRovsDtKA I1fcrZGnc53np/+c623OftajCnDq/e7uEx2IWXBuDq6yW5I0fADtPGhgXXAET0v9 osuLum5RJWgPA1PsXw1sK5fXS6avkZasMSIxjYZk+vbN3tIQc9eRg= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Subject: Re: Defaulting to stabs debug output from AS Cygwin64 To: cygwin AT cygwin DOT com References: <551ec1bb-60e2-2372-8e1a-f4cb839ae454 AT gmail DOT 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 22:41:27 +0200 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 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