summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/debugserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools/debugserver/source/debugserver.cpp')
-rw-r--r--lldb/tools/debugserver/source/debugserver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/tools/debugserver/source/debugserver.cpp b/lldb/tools/debugserver/source/debugserver.cpp
index 8fab13f2dd7..62d0b285455 100644
--- a/lldb/tools/debugserver/source/debugserver.cpp
+++ b/lldb/tools/debugserver/source/debugserver.cpp
@@ -204,10 +204,12 @@ RNBRunLoopLaunchInferior (RNBRemote *remote, const char *stdin_path, const char
char launch_err_str[PATH_MAX];
launch_err_str[0] = '\0';
+ const char * cwd = (ctx.GetWorkingDirPath() != NULL ? ctx.GetWorkingDirPath()
+ : ctx.GetWorkingDirectory());
nub_process_t pid = DNBProcessLaunch (resolved_path,
&inferior_argv[0],
&inferior_envp[0],
- ctx.GetWorkingDirectory(),
+ cwd,
stdin_path,
stdout_path,
stderr_path,
OpenPOWER on IntegriCloud