[dsymutil] Implement the BinaryHolder object and gain archive support.
authorFrederic Riss <friss@apple.com>
Mon, 5 Jan 2015 21:29:28 +0000 (21:29 +0000)
committerFrederic Riss <friss@apple.com>
Mon, 5 Jan 2015 21:29:28 +0000 (21:29 +0000)
commit4398850779b8d6f21ac6376440d5c857a11d40b3
tree192439827ee9f6d9ac073dac2cf2f30fd15ba916
parent2997dbff12ad95e28b396bf37b4b7fe88a5767c1
[dsymutil] Implement the BinaryHolder object and gain archive support.

This object is meant to own the ObjectFiles and their underlying
MemoryBuffer. It is basically the equivalent of an OwningBinary
except that it efficiently handles Archives. It is optimized for
efficiently providing mappings of members of the same archive when
they are opened successively (which is standard in Darwin debug
maps, objects from the same archive will be contiguous).

Of course, the BinaryHolder will also be used by the DWARF linker
once it is commited, but for now only the debug map parser uses it.

With this change, you can run llvm-dsymutil on your Darwin debug build
of clang and get a complete debug map for it.

Differential Revision: http://reviews.llvm.org/D6690

llvm-svn: 225207
llvm/test/tools/dsymutil/Inputs/basic-archive.macho.x86_64 [new file with mode: 0755]
llvm/test/tools/dsymutil/Inputs/basic1.c
llvm/test/tools/dsymutil/Inputs/libbasic.a [new file with mode: 0644]
llvm/test/tools/dsymutil/debug-map-parsing.test
llvm/tools/dsymutil/BinaryHolder.cpp [new file with mode: 0644]
llvm/tools/dsymutil/BinaryHolder.h [new file with mode: 0644]
llvm/tools/dsymutil/CMakeLists.txt
llvm/tools/dsymutil/MachODebugMapParser.cpp