From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30132 invoked by alias); 23 Sep 2011 21:02:48 -0000 Received: (qmail 30124 invoked by uid 22791); 23 Sep 2011 21:02:47 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bramley.apple.com (HELO mail-out.apple.com) (17.151.62.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Sep 2011 21:02:33 +0000 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from relay11.apple.com ([17.128.113.48]) by mail-out.apple.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTPS id <0LRZ00E9JU6E43A1@mail-out.apple.com> for gdb@sourceware.org; Fri, 23 Sep 2011 14:01:45 -0700 (PDT) Received: from moleja2.apple.com (moleja2.apple.com [17.226.33.248]) (using TLS with cipher AES128-SHA (AES128-SHA/128 bits)) (Client did not present a certificate) by relay11.apple.com (Apple SCV relay) with SMTP id 5E.AC.03461.303FC7E4; Fri, 23 Sep 2011 13:58:43 -0700 (PDT) Subject: Re: RFC: DWARF Extensions for Separate Debug Info Files ("Fission") From: Jason Molenda In-reply-to: Date: Fri, 23 Sep 2011 21:02:00 -0000 Cc: dwarf-discuss@lists.dwarfstd.org, gcc@gcc.gnu.org, gdb@sourceware.org, Doug Evans , Paul Pluzhnikov , Sterling Augustine Message-id: References: To: Cary Coutant X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-09/txt/msg00109.txt.bz2 On Sep 23, 2011, at 10:58 AM, Cary Coutant wrote: >> The compiler puts DWARF in the .o file, the linker adds some records in the executable which help us to understand where files/function/symbols landed in the final executable[1]. > > Did you intend to add a footnote? Yeah, I realized after I sent the email - it didn't seem interesting enough to warrant a separate followup. The records that our linker puts in the executable are in the form of stabs entries. There are a handful of stabs records created - file start, file end, function start, function end, symbol, pointer to a .o file, maybe one or two others. We chose that format because it was trivial to support and we already had tools for stripping these records out of the executable once the dSYM had been created. Once a dSYM has been created with all of the DWARF collected in a single file, our DWARF is parseable by any debug info consumer with minimal changes -- they need to know to look in a separate file for the DWARF from the main executable, but the format itself is unchanged. Supporting the debug-information-in-.o-files is more involved, I don't know if any of the third-party debuggers on our platform work with it. > We're trying to achieve something very similar, but we have the > additional goal of separating the info from the .o files because of > our distributed build environment. I also wanted to attempt to > standardize the approach, instead of having each vendor go in separate > directions. Yeah, if your regular build environment involves distributed compilation, and the .o files need to be copied to a central system for the linker, then I can see why you're pursuing this approach. For us, the most common usage is single-computer compilation & linking -- where the linker never pages in the debug info sections from the .o files so their size is not particular important. J