1 //===-- PlatformRemoteGDBServer.h ----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_PlatformRemoteGDBServer_h_
11 #define liblldb_PlatformRemoteGDBServer_h_
17 // Other libraries and framework includes
19 #include "lldb/Target/Platform.h"
20 #include "../../Process/gdb-remote/GDBRemoteCommunicationClient.h"
22 class PlatformRemoteGDBServer : public lldb_private::Platform
32 static lldb_private::Platform*
33 CreateInstance (bool force, const lldb_private::ArchSpec *arch);
35 static lldb_private::ConstString
36 GetPluginNameStatic();
39 GetDescriptionStatic();
42 PlatformRemoteGDBServer ();
45 ~PlatformRemoteGDBServer();
47 //------------------------------------------------------------
48 // lldb_private::PluginInterface functions
49 //------------------------------------------------------------
50 virtual lldb_private::ConstString
53 return GetPluginNameStatic();
63 //------------------------------------------------------------
64 // lldb_private::Platform functions
65 //------------------------------------------------------------
66 virtual lldb_private::Error
67 ResolveExecutable (const lldb_private::FileSpec &exe_file,
68 const lldb_private::ArchSpec &arch,
69 lldb::ModuleSP &module_sp,
70 const lldb_private::FileSpecList *module_search_paths_ptr);
75 virtual lldb_private::Error
76 GetFile (const lldb_private::FileSpec &platform_file,
77 const lldb_private::UUID *uuid_ptr,
78 lldb_private::FileSpec &local_file);
81 GetProcessInfo (lldb::pid_t pid,
82 lldb_private::ProcessInstanceInfo &proc_info);
85 FindProcesses (const lldb_private::ProcessInstanceInfoMatch &match_info,
86 lldb_private::ProcessInstanceInfoList &process_infos);
88 virtual lldb_private::Error
89 LaunchProcess (lldb_private::ProcessLaunchInfo &launch_info);
91 virtual lldb::ProcessSP
92 Attach (lldb_private::ProcessAttachInfo &attach_info,
93 lldb_private::Debugger &debugger,
94 lldb_private::Target *target, // Can be NULL, if NULL create a new target, else use existing one
95 lldb_private::Listener &listener,
96 lldb_private::Error &error);
99 GetSupportedArchitectureAtIndex (uint32_t idx, lldb_private::ArchSpec &arch);
102 GetSoftwareBreakpointTrapOpcode (lldb_private::Target &target,
103 lldb_private::BreakpointSite *bp_site);
106 GetRemoteOSVersion ();
109 GetRemoteOSBuildString (std::string &s);
112 GetRemoteOSKernelDescription (std::string &s);
114 // Remote Platform subclasses need to override this function
115 virtual lldb_private::ArchSpec
116 GetRemoteSystemArchitecture ();
118 // Remote subclasses should override this and return a valid instance
119 // name if connected.
124 GetUserName (uint32_t uid);
127 GetGroupName (uint32_t gid);
130 IsConnected () const;
132 virtual lldb_private::Error
133 ConnectRemote (lldb_private::Args& args);
135 virtual lldb_private::Error
139 GDBRemoteCommunicationClient m_gdb_client;
140 std::string m_platform_description; // After we connect we can get a more complete description of what we are connected to
143 DISALLOW_COPY_AND_ASSIGN (PlatformRemoteGDBServer);
147 #endif // liblldb_PlatformRemoteGDBServer_h_