aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorChaoren Lin <chaorenl@google.com>2015-05-29 19:52:29 +0000
committerChaoren Lin <chaorenl@google.com>2015-05-29 19:52:29 +0000
commitd3173f34e8546a96b8d0df0d9de133f88f10c127 (patch)
tree5e778446085cbd4a4d43fc3b488b3ac6ff17f2b5 /lldb/source/Target/Process.cpp
parent375432e4d8f50212bca3d9228e349b5a00f770d7 (diff)
downloadllvm-d3173f34e8546a96b8d0df0d9de133f88f10c127.zip
llvm-d3173f34e8546a96b8d0df0d9de133f88f10c127.tar.gz
llvm-d3173f34e8546a96b8d0df0d9de133f88f10c127.tar.bz2
Refactor many file functions to use FileSpec over strings.
Summary: This should solve the issue of sending denormalized paths over gdb-remote if we stick to GetPath(false) in GDBRemoteCommunicationClient, and let the server handle any denormalization. Reviewers: ovyalov, zturner, vharron, clayborg Reviewed By: clayborg Subscribers: tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D9728 llvm-svn: 238604
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 322d7fbf..88a07b9 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -432,7 +432,7 @@ ProcessLaunchCommandOptions::SetOptionValue (uint32_t option_idx, const char *op
case 'i': // STDIN for read only
{
FileAction action;
- if (action.Open (STDIN_FILENO, option_arg, true, false))
+ if (action.Open(STDIN_FILENO, FileSpec{option_arg, false}, true, false))
launch_info.AppendFileAction (action);
break;
}
@@ -440,7 +440,7 @@ ProcessLaunchCommandOptions::SetOptionValue (uint32_t option_idx, const char *op
case 'o': // Open STDOUT for write only
{
FileAction action;
- if (action.Open (STDOUT_FILENO, option_arg, false, true))
+ if (action.Open(STDOUT_FILENO, FileSpec{option_arg, false}, false, true))
launch_info.AppendFileAction (action);
break;
}
@@ -448,7 +448,7 @@ ProcessLaunchCommandOptions::SetOptionValue (uint32_t option_idx, const char *op
case 'e': // STDERR for write only
{
FileAction action;
- if (action.Open (STDERR_FILENO, option_arg, false, true))
+ if (action.Open(STDERR_FILENO, FileSpec{option_arg, false}, false, true))
launch_info.AppendFileAction (action);
break;
}
@@ -460,17 +460,18 @@ ProcessLaunchCommandOptions::SetOptionValue (uint32_t option_idx, const char *op
case 'n': // Disable STDIO
{
FileAction action;
- if (action.Open (STDIN_FILENO, "/dev/null", true, false))
+ const FileSpec dev_null{"/dev/null", false};
+ if (action.Open(STDIN_FILENO, dev_null, true, false))
launch_info.AppendFileAction (action);
- if (action.Open (STDOUT_FILENO, "/dev/null", false, true))
+ if (action.Open(STDOUT_FILENO, dev_null, false, true))
launch_info.AppendFileAction (action);
- if (action.Open (STDERR_FILENO, "/dev/null", false, true))
+ if (action.Open(STDERR_FILENO, dev_null, false, true))
launch_info.AppendFileAction (action);
break;
}
case 'w':
- launch_info.SetWorkingDirectory (option_arg);
+ launch_info.SetWorkingDirectory(FileSpec{option_arg, false});
break;
case 't': // Open process in new terminal window