[Lldb-commits] [lldb] r235077 - Pass normalized target file paths via GDB-remote to a target and denormalize them on the target.

Oleksiy Vyalov ovyalov at google.com
Thu Apr 16 00:02:56 PDT 2015


Author: ovyalov
Date: Thu Apr 16 02:02:56 2015
New Revision: 235077

URL: http://llvm.org/viewvc/llvm-project?rev=235077&view=rev
Log:
Pass normalized target file paths via GDB-remote to a target and denormalize them on the target.

http://reviews.llvm.org/D8980

Modified:
    lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp

Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=235077&r1=235076&r2=235077&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Thu Apr 16 02:02:56 2015
@@ -206,7 +206,7 @@ PlatformRemoteGDBServer::GetModuleSpec (
 {
     Log *log = GetLogIfAnyCategoriesSet (LIBLLDB_LOG_PLATFORM);
 
-    const auto module_path = module_file_spec.GetPath ();
+    const auto module_path = module_file_spec.GetPath (false);
 
     if (!m_gdb_client.GetModuleInfo (module_file_spec, arch, module_spec))
     {

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=235077&r1=235076&r2=235077&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Thu Apr 16 02:02:56 2015
@@ -3230,7 +3230,7 @@ GDBRemoteCommunicationClient::OpenFile (
 {
     lldb_private::StreamString stream;
     stream.PutCString("vFile:open:");
-    std::string path (file_spec.GetPath());
+    std::string path (file_spec.GetPath(false));
     if (path.empty())
         return UINT64_MAX;
     stream.PutCStringAsRawHex8(path.c_str());
@@ -3711,7 +3711,7 @@ GDBRemoteCommunicationClient::GetModuleI
                                              const lldb_private::ArchSpec& arch_spec,
                                              ModuleSpec &module_spec)
 {
-    std::string module_path = module_file_spec.GetPath ();
+    std::string module_path = module_file_spec.GetPath (false);
     if (module_path.empty ())
         return false;
 

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp?rev=235077&r1=235076&r2=235077&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp Thu Apr 16 02:02:56 2015
@@ -576,7 +576,8 @@ GDBRemoteCommunicationServerCommon::Hand
             {
                 mode_t mode = packet.GetHexMaxU32(false, 0600);
                 Error error;
-                int fd = ::open (path.c_str(), flags, mode);
+                const FileSpec path_spec(path.c_str(), true);
+                int fd = ::open (path_spec.GetPath().c_str(), flags, mode);
                 const int save_errno = fd == -1 ? errno : 0;
                 StreamString response;
                 response.PutChar('F');
@@ -1162,7 +1163,8 @@ GDBRemoteCommunicationServerCommon::Hand
     packet.GetHexByteString(triple);
     ArchSpec arch(triple.c_str());
 
-    const FileSpec module_path_spec = FindModuleFile(module_path, arch);
+    const FileSpec req_module_path_spec(module_path.c_str(), true);
+    const FileSpec module_path_spec = FindModuleFile(req_module_path_spec.GetPath(), arch);
     const ModuleSpec module_spec(module_path_spec, arch);
 
     ModuleSpecList module_specs;





More information about the lldb-commits mailing list