From 1cb6496eb024249cd9b67e9c53808553128dd0e7 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 24 Mar 2011 04:28:38 +0000 Subject: Did a lot more work on abtracting and organizing the platforms. On Mac OS X we now have 3 platforms: PlatformDarwin - must be subclassed to fill in the missing pure virtual funcs but this implements all the common functionality between remote-macosx and remote-ios. It also allows for another platform to be used (remote-gdb-server for now) when doing remote connections. Keeping this pluggable will allow for flexibility. PlatformMacOSX - Now implements both local and remote macosx desktop platforms. PlatformRemoteiOS - Remote only iOS that knows how to locate SDK files in the cached SDK locations on the host. A new agnostic platform has been created: PlatformRemoteGDBServer - this implements the platform using the GDB remote protocol and uses the built in lldb_private::Host static functions to implement many queries. llvm-svn: 128193 --- .../gdb-remote/GDBRemoteCommunicationClient.h | 35 ++++++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h') diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h index bcf23f2c589..410d80de316 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h @@ -29,6 +29,13 @@ public: virtual ~GDBRemoteCommunicationClient(); + //------------------------------------------------------------------ + // After connecting, send the handshake to the server to make sure + // we are communicating with it. + //------------------------------------------------------------------ + bool + HandshakeWithServer (lldb_private::Error *error_ptr); + size_t SendPacketAndWaitForResponse (const char *send_payload, StringExtractorGDBRemote &response, @@ -49,8 +56,8 @@ public: virtual bool GetThreadSuffixSupported (); - virtual bool - GetSendAcks (); + void + QueryNoAckModeSupported (); bool SendAsyncSignal (int signo); @@ -185,6 +192,23 @@ public: bool GetHostInfo (); + bool + GetOSVersion (uint32_t &major, + uint32_t &minor, + uint32_t &update); + + bool + GetOSBuildString (std::string &s); + + bool + GetOSKernelDescription (std::string &s); + + lldb_private::ArchSpec + GetSystemArchitecture (); + + bool + GetHostname (std::string &s); + bool GetSupportsThreadSuffix (); @@ -232,7 +256,12 @@ protected: int m_async_signal; // We were asked to deliver a signal to the inferior process. lldb_private::ArchSpec m_host_arch; - uint32_t m_cpusubtype; + uint32_t m_os_version_major; + uint32_t m_os_version_minor; + uint32_t m_os_version_update; + std::string m_os_build; + std::string m_os_kernel; + std::string m_hostname; private: //------------------------------------------------------------------ -- cgit v1.2.3