From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115083 invoked by alias); 27 Feb 2019 19:33:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 114941 invoked by uid 89); 27 Feb 2019 19:33:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*c:alternative, Google, distributed X-HELO: mail-io1-f67.google.com Received: from mail-io1-f67.google.com (HELO mail-io1-f67.google.com) (209.85.166.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Feb 2019 19:33:24 +0000 Received: by mail-io1-f67.google.com with SMTP id y6so14547164ioq.10 for ; Wed, 27 Feb 2019 11:33:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I2XcHpjzXE0TwutbVu/g/HK14XRqsr5mDrAUIFTW0LQ=; b=vRBC58Fe4NepNJydewI1i6c7pxbXsKVQmMhkargX0Oxnm/vZtB42AY4qGGUU62dHPP Fb3Lga8Fzqh0ECniCgVdm5TdPBQotNGueaQYZ0+B6i0V+Oiv8SGzGO2c8xyrfJU+oFRp ixZF4Yz8mjRve3qw6RXcmcWWjVrPwaGfZ7cv7+09zoctQr4YnE9qkDEspKL7K88vwVIJ Pp5v/x4HfvghXQhHFHA/Bc1bYxHCp/CaWSLPcubTB5mR5My5/JUXCD1MTP8k/oIZIGJA xm75AP1h2qIhfHd7QtDh2D/heQOX2NCFp8yEVU6LnMJJ8zwcAh9tpI8dGhlJmWNCIZkP j5kw== MIME-Version: 1.0 References: <439bf4f6859a539472a2e51a028b9503@polymtl.ca> <20190225201715.144927-1-rupprecht@google.com> <1b6df15638153631ea87fa1bc7c24dd2@polymtl.ca> <87wolmlh8g.fsf@tromey.com> <878sy187tp.fsf@tromey.com> <3c7c4b2b2211dee0d0cb273a2934dde9@polymtl.ca> <43BCD0FD-28C3-49E5-B7CB-4E18ACFBA646@apple.com> In-Reply-To: <43BCD0FD-28C3-49E5-B7CB-4E18ACFBA646@apple.com> From: David Blaikie Date: Wed, 27 Feb 2019 19:33:00 -0000 Message-ID: Subject: Re: [PATCH] [dwarf2read] Fix crash when loading dwp files: calculate num_sections based on actual section indices, not just the number of sections. To: Adrian Prantl Cc: Eric Christopher , Simon Marchi , Tom Tromey , Jordan Rupprecht , gdb-patches , Douglas Evans Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg00501.txt.bz2 On Wed, Feb 27, 2019 at 10:05 AM Adrian Prantl wrote: > Split DWARF solves a problem that doesn't exist on Darwin (macOS/iOS, > ...). The motivation behind split DWARF is to reduce the number of > relocations in debug info that have to be processed by the linker. But on > Darwin, debug info is not processed by the linker at all, instead a tool > called dsymutil (cf. llvm/tools/dsymutil) serves a conceptually similar > task to dwp and archives the debug info from the .o files into a .dSYM > bundle, separate from the executable. > Same conclusion (Darwin isn't interested in Split DWARF), but slightly different reasons: Split DWARF was intended to reduce the number of bytes needed to be sent to the linker - that problem exists in the current Darwin distribution model, but no one on Darwin seems to have found it to be a problem in practice (basically it was a problem for Google - anyone using a distributed build might eventually have this as a concern/bottleneck/problem). (Split DWARF also reduces the size of the final binary, which is also valuable - and Darwin doesn't have that problem. Basically Darwin's distribution model is more or less like the "single file Split DWARF" mode that the DWARFv5 spec talks about - where you don't actually split it into a separate file, but you leave it in sections the linker will discard/ignore) But yeah, the LLVM implementations of Split DWARF and DWP haven't taken any real concern to work on anything other than ELF, to the best of my knowledge (of the parts I worked on, of the parts I've worked with, etc). - Dave > > -- adrian > > > On Feb 27, 2019, at 9:56 AM, Eric Christopher > wrote: > > > > (Adding in Adrian) > > > > While llvm-dwp will run just fine on osx as a program, it's not > > intended for the platform. I don't know if there are any plans for > > dwarf5-esque split dwarf on apple platforms. Adrian might be able to > > comment more. > > > > -eric > > > > On Wed, Feb 27, 2019 at 9:40 AM Simon Marchi > wrote: > >> > >> On 2019-02-27 12:22, Tom Tromey wrote: > >>>>>>>> "Simon" == Simon Marchi writes: > >>> > >>> Simon> So my impression now is that dwp doesn't apply to non-ELF > >>> projects. > >>> Simon> It is built as part of gold, which itself deals only with ELF, > >>> AFAIK. > >>> Simon> I tried to build gold on AIX, without success. > >>> > >>> I think there's also llvm-dwp. Does it work on Mach-O? > >>> > >>> Tom > >> > >> Of course, there's llvm-dwp, it's the reason this patch was written :). > >> > >> Maybe David (in CC) can help answer this? > >> > >> Simon > >