aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Utility/Reproducer.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2020-03-30 15:09:03 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2020-03-30 15:16:50 -0700
commit38ddb49e5242920e44a982cff7bbe2e86bd23a69 (patch)
treeab13dcfd8986465e8acf19ace73dd6c3a214b710 /lldb/source/Utility/Reproducer.cpp
parentd0dd24a381a7ee54cb42201889a0d4533b0f9ffa (diff)
downloadllvm-38ddb49e5242920e44a982cff7bbe2e86bd23a69.tar.gz
llvm-38ddb49e5242920e44a982cff7bbe2e86bd23a69.tar.bz2
llvm-38ddb49e5242920e44a982cff7bbe2e86bd23a69.zip
[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
Diffstat (limited to 'lldb/source/Utility/Reproducer.cpp')
-rw-r--r--lldb/source/Utility/Reproducer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Utility/Reproducer.cpp b/lldb/source/Utility/Reproducer.cpp
index 8daa3216f7b1..bbf399e599bf 100644
--- a/lldb/source/Utility/Reproducer.cpp
+++ b/lldb/source/Utility/Reproducer.cpp
@@ -321,6 +321,11 @@ void WorkingDirectoryProvider::Keep() {
os << m_cwd << "\n";
}
+void FileProvider::recordInterestingDirectory(const llvm::Twine &dir) {
+ if (m_collector)
+ m_collector->addDirectory(dir);
+}
+
void ProviderBase::anchor() {}
char CommandProvider::ID = 0;
char FileProvider::ID = 0;