From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36461 invoked by alias); 15 May 2018 04:17:56 -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 36437 invoked by uid 89); 15 May 2018 04:17:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=upgraded, Hx-languages-length:1331 X-HELO: mail-oi0-f47.google.com Received: from mail-oi0-f47.google.com (HELO mail-oi0-f47.google.com) (209.85.218.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 May 2018 04:17:54 +0000 Received: by mail-oi0-f47.google.com with SMTP id b130-v6so12724801oif.12 for ; Mon, 14 May 2018 21:17:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=dI6idgQmb7oc3OctGt1ry3NxyOiCltLXnnKyGr6gwaI=; b=cA7dypoHSaU2qJpqoHU9u4nuqSwe3hEh7ZdBCpQ+ioUM7S6zSJTOv5GTsIUMgrivHh 5YDNUTxiMj4FfZPM8GtdRil+mQT9JpB5xfJ0NgnZi3KniN3bX68Mg2sVWiWV9K9g6n3A vMCGTUhPsnUP0Qbjv8EdSB7JES4qlh096G+L5yLL2YaPLWjcZNvoKsvzRgGVHJZsaB3c gd9tVgoWmgMVa1WXiGEOm6sibp//8ta/CSVyI0TwvSvvOND7UfLiM5YXwMshYWKxFhe7 nWPqibpITlLd816XLVTg17teRDxgZIfIkZl+nbYYarBXS5tnBeRqRAT4gFLF+8jFY40y 0uSA== X-Gm-Message-State: ALKqPwfdrefAt/2+FugnCUXSW0wTDLRKIenjsxWDUs9GTkA0U2bkpEly OyydEJ7AkMppsli5sCXBa2vDnoGjmwlq6Tx6oTY4ufeC X-Google-Smtp-Source: AB8JxZr55WWsg0WU/kJYv1Ze3kf2NSTAlweG+vQMjj7b2b4FTASuQp6tJn7klwqfJwfRhIltSCh0M41wQ5zMNwoI/j4= X-Received: by 2002:aca:c108:: with SMTP id r8-v6mr8090025oif.68.1526357873206; Mon, 14 May 2018 21:17:53 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:56e9:0:0:0:0:0 with HTTP; Mon, 14 May 2018 21:17:52 -0700 (PDT) From: Michael Enright Date: Tue, 15 May 2018 12:49:00 -0000 Message-ID: Subject: Defaulting to stabs debug output from AS Cygwin64 To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00190.txt.bz2 I am working on a little compiler for fun, which generates assembly code. At this point I manually invoke as and ld. For debugging I added the -g option to the invocation of as, but then ld failed with t.o:t.s:1:(.stab+0x14): relocation truncated to fit: R_X86_64_32 against `.text' Looking into this on Stack Overflow I was taught that stabs is obsolete. I think 'obsolete' may not be quite the right interpretation, but 'wrong for Cygwin64' could be the right story. Practically speaking, without thinking about it too critically, -gdwarf2 in place of -g is the solution. I'm trying to find authority for saying anything exact about the situation: 1) Is there a reason why stabs is the default for '-g' with Cygwin64? 1a) Is a patch desired to make dwarf2 the default? 2) Is there a way within Cygwin64 that a .o file with stabs can be properly processed by ld to give proper input to gdb? 3) Is stabs fatally flawed for the purposes of Cygwin64 or could it be upgraded, within the existing meaning of the stabs specification, so that it would work? 3a) To put it another way, is this just a stabs bug that could be fixed for Cygwin64? Above when I say Cygwin64, I'm talking about straightforward native use of as, ld, and gdb, not cross-compiling to some other platform. -- 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