From d3173f34e8546a96b8d0df0d9de133f88f10c127 Mon Sep 17 00:00:00 2001 From: Chaoren Lin Date: Fri, 29 May 2015 19:52:29 +0000 Subject: 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 --- .../Platform/gdb-server/PlatformRemoteGDBServer.h | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h') diff --git a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h index d689e1ee3de..1d97b4dbc68 100644 --- a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h +++ b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h @@ -128,11 +128,11 @@ public: ArchSpec GetRemoteSystemArchitecture () override; - ConstString + FileSpec GetRemoteWorkingDirectory() override; bool - SetRemoteWorkingDirectory(const ConstString &path) override; + SetRemoteWorkingDirectory(const FileSpec &working_dir) override; // Remote subclasses should override this and return a valid instance // name if connected. @@ -155,14 +155,14 @@ public: DisconnectRemote () override; Error - MakeDirectory (const char *path, uint32_t file_permissions) override; - + MakeDirectory(const FileSpec &file_spec, uint32_t file_permissions) override; + Error - GetFilePermissions (const char *path, uint32_t &file_permissions) override; - + GetFilePermissions(const FileSpec &file_spec, uint32_t &file_permissions) override; + Error - SetFilePermissions (const char *path, uint32_t file_permissions) override; - + SetFilePermissions(const FileSpec &file_spec, uint32_t file_permissions) override; + lldb::user_id_t OpenFile (const FileSpec& file_spec, uint32_t flags, uint32_t mode, Error &error) override; @@ -194,21 +194,21 @@ public: uint32_t gid = UINT32_MAX) override; Error - CreateSymlink (const char *src, const char *dst) override; + CreateSymlink(const FileSpec &src, const FileSpec &dst) override; bool GetFileExists (const FileSpec& file_spec) override; Error - Unlink (const char *path) override; + Unlink(const FileSpec &path) override; 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) override; // 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) override; // Timeout in seconds to wait for shell program to finish void CalculateTrapHandlerSymbolNames () override; -- cgit v1.2.3