[Lldb-commits] [lldb] r155097 - in /lldb/branches/lldb-platform-work/source: Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h Utility/StringExtractorGDBRemote.cpp Utility/StringExtractorGDBRemote.h

Enrico Granata egranata at apple.com
Wed Apr 18 19:32:57 PDT 2012


Author: enrico
Date: Wed Apr 18 21:32:57 2012
New Revision: 155097

URL: http://llvm.org/viewvc/llvm-project?rev=155097&view=rev
Log:
Removed the Syscall_System packet - now the new RunShellCommand() is the sole interface to running programs on the remote system

Modified:
    lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h
    lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.cpp
    lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.h

Modified: lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=155097&r1=155096&r2=155097&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Wed Apr 18 21:32:57 2012
@@ -415,12 +415,6 @@
 }
 
 uint32_t
-PlatformRemoteGDBServer::RunShellCommand (const std::string &command_line)
-{
-    return m_gdb_client.RunShellCommand(command_line);
-}
-
-uint32_t
 PlatformRemoteGDBServer::MakeDirectory (const std::string &path,
                                         mode_t mode)
 {

Modified: lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h?rev=155097&r1=155096&r2=155097&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h Wed Apr 18 21:32:57 2012
@@ -142,9 +142,6 @@
     DisconnectRemote ();
     
     virtual uint32_t
-    RunShellCommand (const std::string &command_line);
-    
-    virtual uint32_t
     MakeDirectory (const std::string &path,
                    mode_t mode);
     

Modified: lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=155097&r1=155096&r2=155097&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Wed Apr 18 21:32:57 2012
@@ -1896,22 +1896,6 @@
     return LLDB_INVALID_ADDRESS;
 }
 
-uint32_t
-GDBRemoteCommunicationClient::RunShellCommand (const std::string &command_line)
-{
-    lldb_private::StreamString stream;
-    stream.PutCString("qPlatform_Syscall_System:");
-    stream.PutBytesAsRawHex8(command_line.c_str(), command_line.size());
-    const char *packet = stream.GetData();
-    int packet_len = stream.GetSize();
-    StringExtractorGDBRemote response;
-    if (SendPacketAndWaitForResponse(packet, packet_len, response, false))
-    {
-        return response.GetHexMaxU32(false, UINT32_MAX);
-    }
-    return UINT32_MAX;
-}
-
 lldb_private::Error
 GDBRemoteCommunicationClient::RunShellCommand (const char *command,           // Shouldn't be NULL
                                                const char *working_dir,       // Pass NULL to use the current working directory

Modified: lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h?rev=155097&r1=155096&r2=155097&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h Wed Apr 18 21:32:57 2012
@@ -338,9 +338,6 @@
         return m_interrupt_sent;
     }
     
-    virtual uint32_t
-    RunShellCommand (const std::string &command_line);
-    
     virtual lldb::user_id_t
     OpenFile (const lldb_private::FileSpec& file_spec,
               uint32_t flags,

Modified: lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp?rev=155097&r1=155096&r2=155097&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp Wed Apr 18 21:32:57 2012
@@ -162,9 +162,6 @@
             case StringExtractorGDBRemote::eServerPacketType_QStartNoAckMode:
                 return Handle_QStartNoAckMode (packet);
                 
-            case StringExtractorGDBRemote::eServerPacketType_qPlatform_Syscall_System:
-                return Handle_qPlatform_Syscall_System (packet);
-                
             case StringExtractorGDBRemote::eServerPacketType_qPlatform_IO_MkDir:
                 return Handle_qPlatform_IO_MkDir (packet);
                 
@@ -862,25 +859,6 @@
 }
 
 bool
-GDBRemoteCommunicationServer::Handle_qPlatform_Syscall_System (StringExtractorGDBRemote &packet)
-{
-    packet.SetFilePos(::strlen("qPlatform_Syscall_System:"));
-    std::string path;
-    packet.GetHexByteString(path);
-    int retcode;
-    Host::RunShellCommand(path.c_str(),
-                          NULL,
-                          &retcode,
-                          NULL,
-                          NULL,
-                          60);
-    StreamString response;
-    response.PutHex32(retcode);
-    SendPacketNoLock(response.GetData(), response.GetSize());
-    return true;
-}
-
-bool
 GDBRemoteCommunicationServer::Handle_qPlatform_IO_MkDir (StringExtractorGDBRemote &packet)
 {
     packet.SetFilePos(::strlen("qPlatform_IO_MkDir:"));

Modified: lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h?rev=155097&r1=155096&r2=155097&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h Wed Apr 18 21:32:57 2012
@@ -99,9 +99,6 @@
     Handle_qPlatform_IO_MkDir (StringExtractorGDBRemote &packet);
     
     bool
-    Handle_qPlatform_Syscall_System (StringExtractorGDBRemote &packet);
-    
-    bool
     Handle_qProcessInfoPID (StringExtractorGDBRemote &packet);
     
     bool

Modified: lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.cpp?rev=155097&r1=155096&r2=155097&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.cpp Wed Apr 18 21:32:57 2012
@@ -127,7 +127,6 @@
             
         case 'P':
             if (PACKET_STARTS_WITH ("qProcessInfoPID:"))                 return eServerPacketType_qProcessInfoPID;
-            if (PACKET_STARTS_WITH ("qPlatform_Syscall_System:"))        return eServerPacketType_qPlatform_Syscall_System;
             if (PACKET_STARTS_WITH ("qPlatform_RunCommand:"))            return eServerPacketType_qPlatform_RunCommand;
             if (PACKET_STARTS_WITH ("qPlatform_IO_MkDir:"))              return eServerPacketType_qPlatform_IO_MkDir;
             break;

Modified: lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.h?rev=155097&r1=155096&r2=155097&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.h (original)
+++ lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.h Wed Apr 18 21:32:57 2012
@@ -64,7 +64,6 @@
         eServerPacketType_QSetSTDERR,
         eServerPacketType_QSetWorkingDir,
         eServerPacketType_QStartNoAckMode,
-        eServerPacketType_qPlatform_Syscall_System,
         eServerPacketType_qPlatform_RunCommand,
         eServerPacketType_qPlatform_IO_MkDir,
         eServerPacketType_vFile_Open,





More information about the lldb-commits mailing list