diff options
author | Chaoren Lin <chaorenl@google.com> | 2015-05-29 19:52:29 +0000 |
---|---|---|
committer | Chaoren Lin <chaorenl@google.com> | 2015-05-29 19:52:29 +0000 |
commit | d3173f34e8546a96b8d0df0d9de133f88f10c127 (patch) | |
tree | 5e778446085cbd4a4d43fc3b488b3ac6ff17f2b5 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h | |
parent | 375432e4d8f50212bca3d9228e349b5a00f770d7 (diff) | |
download | bcm5719-llvm-d3173f34e8546a96b8d0df0d9de133f88f10c127.tar.gz bcm5719-llvm-d3173f34e8546a96b8d0df0d9de133f88f10c127.zip |
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/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h index 23b5d382a0c..726bc577a1b 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h @@ -205,11 +205,11 @@ public: /// Zero if the for success, or an error code for failure. //------------------------------------------------------------------ int - SetSTDIN (char const *path); + SetSTDIN(const FileSpec &file_spec); int - SetSTDOUT (char const *path); + SetSTDOUT(const FileSpec &file_spec); int - SetSTDERR (char const *path); + SetSTDERR(const FileSpec &file_spec); //------------------------------------------------------------------ /// Sets the disable ASLR flag to \a enable for a process that will @@ -243,27 +243,27 @@ public: /// implements the platform, it will change the current working /// directory for the platform process. /// - /// @param[in] path + /// @param[in] working_dir /// The path to a directory to use when launching our process /// /// @return /// Zero if the for success, or an error code for failure. //------------------------------------------------------------------ int - SetWorkingDir (char const *path); + SetWorkingDir(const FileSpec &working_dir); //------------------------------------------------------------------ /// Gets the current working directory of a remote platform GDB /// server. /// - /// @param[out] cwd + /// @param[out] working_dir /// The current working directory on the remote platform. /// /// @return /// Boolean for success //------------------------------------------------------------------ bool - GetWorkingDir (std::string &cwd); + GetWorkingDir(FileSpec &working_dir); lldb::addr_t AllocateMemory (size_t size, uint32_t permissions); @@ -466,10 +466,10 @@ public: GetFileSize (const FileSpec& file_spec); Error - GetFilePermissions(const char *path, uint32_t &file_permissions); + GetFilePermissions(const FileSpec &file_spec, uint32_t &file_permissions); Error - SetFilePermissions(const char *path, uint32_t file_permissions); + SetFilePermissions(const FileSpec &file_spec, uint32_t file_permissions); uint64_t ReadFile (lldb::user_id_t fd, @@ -486,26 +486,26 @@ public: Error &error); Error - CreateSymlink (const char *src, - const char *dst); + CreateSymlink(const FileSpec &src, + const FileSpec &dst); Error - Unlink (const char *path); + Unlink(const FileSpec &file_spec); Error - MakeDirectory (const char *path, uint32_t mode); - + MakeDirectory(const FileSpec &file_spec, uint32_t mode); + bool GetFileExists (const FileSpec& file_spec); Error - RunShellCommand (const char *command, // Shouldn't be NULL - const char *working_dir, // Pass NULL to use the current working directory - int *status_ptr, // Pass NULL if you don't want the process exit status - int *signo_ptr, // Pass NULL if you don't want the signal that caused the process to exit - std::string *command_output, // Pass NULL if you don't want the command output - uint32_t timeout_sec); // Timeout in seconds to wait for shell program to finish - + RunShellCommand(const char *command, // Shouldn't be NULL + const FileSpec &working_dir, // Pass empty FileSpec to use the current working directory + int *status_ptr, // Pass NULL if you don't want the process exit status + int *signo_ptr, // Pass NULL if you don't want the signal that caused the process to exit + std::string *command_output, // Pass NULL if you don't want the command output + uint32_t timeout_sec); // Timeout in seconds to wait for shell program to finish + bool CalculateMD5 (const FileSpec& file_spec, uint64_t &high, uint64_t &low); |