Re-land "[lldb/Reproducers] Always collect the whole dSYM in the reproducer"
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 31 Mar 2020 18:35:55 +0000 (11:35 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 31 Mar 2020 19:47:12 +0000 (12:47 -0700)
commit015c6cd47557272bb8b92fbf9f5bd2bcb8fa8989
treebf50480b52e0317e876832e774bbb0cb9b714ce4
parent11ccad6e879573f75dc8b231351ee23a17e0900f
Re-land "[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]