diff options
| author | Zachary Turner <zturner@google.com> | 2015-02-18 23:59:11 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2015-02-18 23:59:11 +0000 |
| commit | ee69a4bcd06a71fc798c8924f212c4cfd52696c7 (patch) | |
| tree | 133e124f2c7044679aa0b4385b919c1326726065 | |
| parent | fc2751122310843f9782f4961d0c41cacc6a9707 (diff) | |
| download | bcm5719-llvm-ee69a4bcd06a71fc798c8924f212c4cfd52696c7.tar.gz bcm5719-llvm-ee69a4bcd06a71fc798c8924f212c4cfd52696c7.zip | |
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.
llvm-svn: 229784
| -rw-r--r-- | lldb/source/Target/Platform.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index 6b98ab89f11..c6455992081 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -1122,7 +1122,11 @@ Platform::LaunchProcess (ProcessLaunchInfo &launch_info) 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 (ProcessLaunchInfo &launch_info) 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", |

