aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectProcess.cpp
diff options
context:
space:
mode:
authorwalter erquinigo <walter@modular.com>2024-11-05 13:26:59 -0500
committerwalter erquinigo <walter@modular.com>2024-11-05 13:29:51 -0500
commite952728f88c8b0e0208dc991dd9a04fe8c211cfb (patch)
tree8707ce23af2df4193797addefba7fce78b3ff324 /lldb/source/Commands/CommandObjectProcess.cpp
parent3cdac0670823e2da58001bc2600d2e74c929ae5b (diff)
downloadllvm-e952728f88c8b0e0208dc991dd9a04fe8c211cfb.zip
llvm-e952728f88c8b0e0208dc991dd9a04fe8c211cfb.tar.gz
llvm-e952728f88c8b0e0208dc991dd9a04fe8c211cfb.tar.bz2
[LLDB] Retry Add a target.launch-working-dir setting
This retries the PR 113521 skipping a test in a remote environment.
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index e7c7d07..7444e46 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -201,6 +201,13 @@ protected:
if (target->GetDisableSTDIO())
m_options.launch_info.GetFlags().Set(eLaunchFlagDisableSTDIO);
+ if (!m_options.launch_info.GetWorkingDirectory()) {
+ if (llvm::StringRef wd = target->GetLaunchWorkingDirectory();
+ !wd.empty()) {
+ m_options.launch_info.SetWorkingDirectory(FileSpec(wd));
+ }
+ }
+
// Merge the launch info environment with the target environment.
Environment target_env = target->GetEnvironment();
m_options.launch_info.GetEnvironment().insert(target_env.begin(),