[Lldb-commits] [lldb] r229784 - A few minor path fixes for Windows.
Zachary Turner
zturner at google.com
Wed Feb 18 15:59:12 PST 2015
Author: zturner
Date: Wed Feb 18 17:59:11 2015
New Revision: 229784
URL: http://llvm.org/viewvc/llvm-project?rev=229784&view=rev
Log:
A few minor path fixes for Windows.
When launching argdumper, there are a few problems with the
current logic. First, on Windows, the file is called
argdumper.exe, not argdumper. Second, Windows paths have
backslashes in them, and JSON treats <backslash><char> as an
escape sequence. To fix the second problem, on Windows we
convert backslashes to forward slashes, since backslash isn't
a valid filename character anyway this shouldn't be a problem.
Modified:
lldb/trunk/source/Target/Platform.cpp
Modified: lldb/trunk/source/Target/Platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=229784&r1=229783&r2=229784&view=diff
==============================================================================
--- lldb/trunk/source/Target/Platform.cpp (original)
+++ lldb/trunk/source/Target/Platform.cpp Wed Feb 18 17:59:11 2015
@@ -1122,7 +1122,11 @@ Platform::LaunchProcess (ProcessLaunchIn
error.SetErrorString("could not find argdumper tool");
return error;
}
+#if defined(_WIN32)
+ glob_tool_spec.AppendPathComponent("argdumper.exe");
+#else
glob_tool_spec.AppendPathComponent("argdumper");
+#endif
if (!glob_tool_spec.Exists())
{
error.SetErrorString("could not find argdumper tool");
@@ -1131,7 +1135,9 @@ Platform::LaunchProcess (ProcessLaunchIn
std::string quoted_cmd_string;
launch_info.GetArguments().GetQuotedCommandString(quoted_cmd_string);
-
+#if defined(_WIN32)
+ std::replace(quoted_cmd_string.begin(), quoted_cmd_string.end(), '\\', '/');
+#endif
StreamString glob_command;
glob_command.Printf("%s %s",
More information about the lldb-commits
mailing list