Author: enrico Date: Mon Nov 2 19:47:19 2015 New Revision: 251882 URL: http://llvm.org/viewvc/llvm-project?rev=251882&view=rev Log: Emit an error message if the current working directory does not exist when the user is trying to launch argdumper to do shell expansion
Modified: lldb/trunk/source/Host/macosx/Host.mm Modified: lldb/trunk/source/Host/macosx/Host.mm URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=251882&r1=251881&r2=251882&view=diff ============================================================================== --- lldb/trunk/source/Host/macosx/Host.mm (original) +++ lldb/trunk/source/Host/macosx/Host.mm Mon Nov 2 19:47:19 2015 @@ -1371,7 +1371,13 @@ Host::ShellExpandArguments (ProcessLaunc int status; std::string output; - RunShellCommand(expand_command, launch_info.GetWorkingDirectory(), &status, nullptr, &output, 10); + FileSpec cwd(launch_info.GetWorkingDirectory()); + if (!cwd.Exists()) + { + error.SetErrorStringWithFormat("cwd does not exist; cannot launch with shell argument expansion"); + return error; + } + RunShellCommand(expand_command, cwd, &status, nullptr, &output, 10); if (status != 0) { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits