This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [dwarf2read] Fix crash when loading dwp files: calculate num_sections based on actual section indices, not just the number of sections.


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.

-- adrian

> On Feb 27, 2019, at 9:56 AM, Eric Christopher <echristo@gmail.com> 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 <simon.marchi@polymtl.ca> wrote:
>> 
>> On 2019-02-27 12:22, Tom Tromey wrote:
>>>>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]