summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-06-18 16:20:17 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-06-18 16:20:17 +0000
commitc470ac50a8a45aa62ba50d435ff3048c6c274273 (patch)
tree825acf2b7d5a2570aa2d5ea30029c1501f76adf7 /lldb/source/API
parentcfc70782d7e1b88eeee0c6269522ecf46572cd1e (diff)
downloadbcm5719-llvm-c470ac50a8a45aa62ba50d435ff3048c6c274273.tar.gz
bcm5719-llvm-c470ac50a8a45aa62ba50d435ff3048c6c274273.zip
[Reproducers] Make reproducer relocatable
Before this patch, reproducers weren't relocatable. The reproducer contained hard coded paths in the VFS mapping, as well in the yaml file listing the different input files for the command interpreter. This patch changes that: - Use relative paths for the DataCollector. - Use an overlay prefix for the FileCollector. Differential revision: https://reviews.llvm.org/D63467 llvm-svn: 363697
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBDebugger.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index 7af83324e9f..634c4a92959 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -82,6 +82,12 @@ public:
if (auto err = yin.error())
return {};
+ for (auto &file : files) {
+ FileSpec absolute_path =
+ loader->GetRoot().CopyByAppendingPathComponent(file);
+ file = absolute_path.GetPath();
+ }
+
return llvm::make_unique<CommandLoader>(std::move(files));
}
OpenPOWER on IntegriCloud