1 //===-- ConnectionSharedMemory.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_ConnectionSharedMemory_h_
11 #define liblldb_ConnectionSharedMemory_h_
17 // Other libraries and framework includes
19 #include "lldb/Core/Connection.h"
20 #include "lldb/Core/DataBufferMemoryMap.h"
22 namespace lldb_private {
24 class ConnectionSharedMemory :
29 ConnectionSharedMemory ();
31 ~ConnectionSharedMemory () override;
34 IsConnected () const override;
36 virtual lldb::ConnectionStatus
37 BytesAvailable (uint32_t timeout_usec, Error *error_ptr);
39 lldb::ConnectionStatus
40 Connect (const char *s, Error *error_ptr) override;
42 lldb::ConnectionStatus
43 Disconnect (Error *error_ptr) override;
48 uint32_t timeout_usec,
49 lldb::ConnectionStatus &status,
50 Error *error_ptr) override;
53 Write (const void *src, size_t src_len, lldb::ConnectionStatus &status, Error *error_ptr) override;
58 lldb::ConnectionStatus
59 Open (bool create, const char *name, size_t size, Error *error_ptr);
64 int m_fd; // One buffer that contains all we need
65 DataBufferMemoryMap m_mmap;
69 DISALLOW_COPY_AND_ASSIGN (ConnectionSharedMemory);
72 } // namespace lldb_private
74 #endif // liblldb_ConnectionSharedMemory_h_