1 //===-- PlatformAndroidRemoteGDBServer.h ------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef liblldb_PlatformAndroidRemoteGDBServer_h_ 11 #define liblldb_PlatformAndroidRemoteGDBServer_h_ 12 13 // C Includes 14 // C++ Includes 15 #include <map> 16 #include <utility> 17 18 // Other libraries and framework includes 19 // Project includes 20 #include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h" 21 22 class PlatformAndroidRemoteGDBServer : public PlatformRemoteGDBServer 23 { 24 public: 25 PlatformAndroidRemoteGDBServer (); 26 27 virtual 28 ~PlatformAndroidRemoteGDBServer (); 29 30 lldb_private::Error 31 ConnectRemote (lldb_private::Args& args) override; 32 33 lldb_private::Error 34 DisconnectRemote () override; 35 36 protected: 37 std::map<lldb::pid_t, std::pair<uint16_t, std::string>> m_port_forwards; 38 39 uint16_t 40 LaunchGDBserverAndGetPort (lldb::pid_t &pid) override; 41 42 bool 43 KillSpawnedProcess (lldb::pid_t pid) override; 44 45 private: 46 DISALLOW_COPY_AND_ASSIGN (PlatformAndroidRemoteGDBServer); 47 48 }; 49 50 #endif // liblldb_PlatformAndroidRemoteGDBServer_h_ 51