[lldb/Reproducers] Always collect the whole dSYM in the reproducer
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 30 Mar 2020 22:09:03 +0000 (15:09 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 30 Mar 2020 22:16:50 +0000 (15:16 -0700)
commit38ddb49e5242920e44a982cff7bbe2e86bd23a69
treeab13dcfd8986465e8acf19ace73dd6c3a214b710
parentd0dd24a381a7ee54cb42201889a0d4533b0f9ffa
[lldb/Reproducers] Always collect the whole dSYM in the reproducer

The FileCollector in LLDB collects every files that's used during a
debug session when capture is enabled. This ensures that the reproducer
only contains the files necessary to reproduce. This approach is not a
good fit for the dSYM bundle, which is a directory on disk, but should
be treated as a single unit.

On macOS LLDB have automatically find the matching dSYM for a binary by
its UUID. Having a incomplete dSYM in a reproducer can break debugging
even when reproducers are disabled.

This patch adds a was to specify a directory of interest to the
reproducers. It is called from SymbolVendorMacOSX with the path of the
dSYMs used by LLDB.

Differential revision: https://reviews.llvm.org/D76672
lldb/include/lldb/Utility/Reproducer.h
lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
lldb/source/Utility/Reproducer.cpp
lldb/test/Shell/Reproducer/TestDSYM.test [new file with mode: 0644]