Index: include/lldb/Host/FileSpec.h =================================================================== --- include/lldb/Host/FileSpec.h +++ include/lldb/Host/FileSpec.h @@ -677,8 +677,14 @@ SetFile (const char *path, bool resolve_path, PathSyntax syntax = ePathSyntaxHostNative); void + SetFile(const char *path, bool resolve_path, ArchSpec arch); + + void SetFile(const std::string &path, bool resolve_path, PathSyntax syntax = ePathSyntaxHostNative); + void + SetFile(const std::string &path, bool resolve_path, ArchSpec arch); + bool IsResolved () const { Index: source/Host/common/FileSpec.cpp =================================================================== --- source/Host/common/FileSpec.cpp +++ source/Host/common/FileSpec.cpp @@ -329,11 +329,26 @@ } void +FileSpec::SetFile(const char *pathname, bool resolve, ArchSpec arch) +{ + return SetFile(pathname, resolve, + arch.GetTriple().isOSWindows() + ? ePathSyntaxWindows + : ePathSyntaxPosix); +} + +void FileSpec::SetFile(const std::string &pathname, bool resolve, PathSyntax syntax) { return SetFile(pathname.c_str(), resolve, syntax); } +void +FileSpec::SetFile(const std::string &pathname, bool resolve, ArchSpec arch) +{ + return SetFile(pathname.c_str(), resolve, arch); +} + //---------------------------------------------------------------------- // Convert to pointer operator. This allows code to check any FileSpec // objects to see if they contain anything valid using code such as: Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -2288,7 +2288,7 @@ return false; std::string cwd; response.GetHexByteString(cwd); - working_dir.SetFile(cwd, false); + working_dir.SetFile(cwd, false, GetHostArchitecture()); return !cwd.empty(); } return false;