Greg Clayton | 61d043b | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 1 | //===-- GDBRemoteCommunicationServer.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_GDBRemoteCommunicationServer_h_ |
| 11 | #define liblldb_GDBRemoteCommunicationServer_h_ |
| 12 | |
| 13 | // C Includes |
| 14 | // C++ Includes |
| 15 | // Other libraries and framework includes |
| 16 | // Project includes |
| 17 | #include "GDBRemoteCommunication.h" |
| 18 | |
| 19 | class ProcessGDBRemote; |
| 20 | |
| 21 | class GDBRemoteCommunicationServer : public GDBRemoteCommunication |
| 22 | { |
| 23 | public: |
| 24 | enum |
| 25 | { |
| 26 | eBroadcastBitRunPacketSent = kLoUserBroadcastBit |
| 27 | }; |
| 28 | //------------------------------------------------------------------ |
| 29 | // Constructors and Destructors |
| 30 | //------------------------------------------------------------------ |
| 31 | GDBRemoteCommunicationServer(); |
| 32 | |
| 33 | virtual |
| 34 | ~GDBRemoteCommunicationServer(); |
| 35 | |
| 36 | bool |
Greg Clayton | cb8977d | 2011-03-23 00:09:55 +0000 | [diff] [blame] | 37 | GetPacketAndSendResponse (const lldb_private::TimeValue* timeout_ptr, |
Greg Clayton | 58e26e0 | 2011-03-24 04:28:38 +0000 | [diff] [blame^] | 38 | lldb_private::Error &error, |
Greg Clayton | cb8977d | 2011-03-23 00:09:55 +0000 | [diff] [blame] | 39 | bool &interrupt, |
| 40 | bool &quit); |
Greg Clayton | 61d043b | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 41 | |
| 42 | virtual bool |
| 43 | GetThreadSuffixSupported () |
| 44 | { |
| 45 | return true; |
| 46 | } |
| 47 | |
Greg Clayton | 58e26e0 | 2011-03-24 04:28:38 +0000 | [diff] [blame^] | 48 | // After connecting, do a little handshake with the client to make sure |
| 49 | // we are at least communicating |
| 50 | bool |
| 51 | HandshakeWithClient (lldb_private::Error *error_ptr); |
Greg Clayton | 61d043b | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 52 | |
| 53 | protected: |
| 54 | lldb::thread_t m_async_thread; |
Greg Clayton | 61d043b | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 55 | |
| 56 | size_t |
| 57 | SendUnimplementedResponse (); |
| 58 | |
Greg Clayton | 58e26e0 | 2011-03-24 04:28:38 +0000 | [diff] [blame^] | 59 | size_t |
| 60 | SendOKResponse (); |
Greg Clayton | 61d043b | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 61 | |
| 62 | bool |
| 63 | Handle_qHostInfo (); |
| 64 | |
Greg Clayton | 58e26e0 | 2011-03-24 04:28:38 +0000 | [diff] [blame^] | 65 | bool |
| 66 | Handle_QStartNoAckMode (); |
| 67 | |
Greg Clayton | 61d043b | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 68 | private: |
| 69 | //------------------------------------------------------------------ |
| 70 | // For GDBRemoteCommunicationServer only |
| 71 | //------------------------------------------------------------------ |
| 72 | DISALLOW_COPY_AND_ASSIGN (GDBRemoteCommunicationServer); |
| 73 | }; |
| 74 | |
| 75 | #endif // liblldb_GDBRemoteCommunicationServer_h_ |