Skip to content

Commit 7d9d941

Browse files
committedApr 16, 2015
Pass normalized target file paths via GDB-remote to a target and denormalize them on the target.
http://reviews.llvm.org/D8980 llvm-svn: 235077
1 parent 20e1556 commit 7d9d941

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed
 

‎lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ PlatformRemoteGDBServer::GetModuleSpec (const FileSpec& module_file_spec,
206206
{
207207
Log *log = GetLogIfAnyCategoriesSet (LIBLLDB_LOG_PLATFORM);
208208

209-
const auto module_path = module_file_spec.GetPath ();
209+
const auto module_path = module_file_spec.GetPath (false);
210210

211211
if (!m_gdb_client.GetModuleInfo (module_file_spec, arch, module_spec))
212212
{

‎lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3230,7 +3230,7 @@ GDBRemoteCommunicationClient::OpenFile (const lldb_private::FileSpec& file_spec,
32303230
{
32313231
lldb_private::StreamString stream;
32323232
stream.PutCString("vFile:open:");
3233-
std::string path (file_spec.GetPath());
3233+
std::string path (file_spec.GetPath(false));
32343234
if (path.empty())
32353235
return UINT64_MAX;
32363236
stream.PutCStringAsRawHex8(path.c_str());
@@ -3711,7 +3711,7 @@ GDBRemoteCommunicationClient::GetModuleInfo (const FileSpec& module_file_spec,
37113711
const lldb_private::ArchSpec& arch_spec,
37123712
ModuleSpec &module_spec)
37133713
{
3714-
std::string module_path = module_file_spec.GetPath ();
3714+
std::string module_path = module_file_spec.GetPath (false);
37153715
if (module_path.empty ())
37163716
return false;
37173717

‎lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,8 @@ GDBRemoteCommunicationServerCommon::Handle_vFile_Open (StringExtractorGDBRemote
576576
{
577577
mode_t mode = packet.GetHexMaxU32(false, 0600);
578578
Error error;
579-
int fd = ::open (path.c_str(), flags, mode);
579+
const FileSpec path_spec(path.c_str(), true);
580+
int fd = ::open (path_spec.GetPath().c_str(), flags, mode);
580581
const int save_errno = fd == -1 ? errno : 0;
581582
StreamString response;
582583
response.PutChar('F');
@@ -1162,7 +1163,8 @@ GDBRemoteCommunicationServerCommon::Handle_qModuleInfo (StringExtractorGDBRemote
11621163
packet.GetHexByteString(triple);
11631164
ArchSpec arch(triple.c_str());
11641165

1165-
const FileSpec module_path_spec = FindModuleFile(module_path, arch);
1166+
const FileSpec req_module_path_spec(module_path.c_str(), true);
1167+
const FileSpec module_path_spec = FindModuleFile(req_module_path_spec.GetPath(), arch);
11661168
const ModuleSpec module_spec(module_path_spec, arch);
11671169

11681170
ModuleSpecList module_specs;

0 commit comments

Comments
 (0)