forked from OSchip/llvm-project
Working directory FileSpec should use remote path syntax to display correctly.
Summary: Depends on D9728. Reviewers: ovyalov, zturner, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9806 llvm-svn: 238605
This commit is contained in:
parent
d3173f34e8
commit
44145d79cc
|
@ -668,9 +668,15 @@ public:
|
|||
void
|
||||
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
|
||||
{
|
||||
|
|
|
@ -344,12 +344,27 @@ FileSpec::SetFile (const char *pathname, bool resolve, PathSyntax syntax)
|
|||
m_directory.SetCString(normalized.c_str());
|
||||
}
|
||||
|
||||
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:
|
||||
|
|
|
@ -2301,7 +2301,7 @@ GDBRemoteCommunicationClient::GetWorkingDir(FileSpec &working_dir)
|
|||
return false;
|
||||
std::string cwd;
|
||||
response.GetHexByteString(cwd);
|
||||
working_dir.SetFile(cwd, false);
|
||||
working_dir.SetFile(cwd, false, GetHostArchitecture());
|
||||
return !cwd.empty();
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue