summaryrefslogtreecommitdiffstats
path: root/lldb/include/lldb/Utility/StreamGDBRemote.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/include/lldb/Utility/StreamGDBRemote.h')
-rw-r--r--lldb/include/lldb/Utility/StreamGDBRemote.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/lldb/include/lldb/Utility/StreamGDBRemote.h b/lldb/include/lldb/Utility/StreamGDBRemote.h
new file mode 100644
index 00000000000..14a41d796a1
--- /dev/null
+++ b/lldb/include/lldb/Utility/StreamGDBRemote.h
@@ -0,0 +1,51 @@
+//===-- StreamGDBRemote.h ----------------------------------------*- C++
+//-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_StreamGDBRemote_h_
+#define liblldb_StreamGDBRemote_h_
+
+// C Includes
+// C++ Includes
+
+// Other libraries and framework includes
+// Project includes
+
+#include "lldb/Utility/StreamString.h"
+
+namespace lldb_private {
+
+class StreamGDBRemote : public StreamString {
+public:
+ StreamGDBRemote();
+
+ StreamGDBRemote(uint32_t flags, uint32_t addr_size,
+ lldb::ByteOrder byte_order);
+
+ ~StreamGDBRemote() override;
+
+ //------------------------------------------------------------------
+ /// Output a block of data to the stream performing GDB-remote escaping.
+ ///
+ /// @param[in] s
+ /// A block of data.
+ ///
+ /// @param[in] src_len
+ /// The amount of data to write.
+ ///
+ /// @return
+ /// Number of bytes written.
+ //------------------------------------------------------------------
+ // TODO: Convert this function to take ArrayRef<uint8_t>
+ int PutEscapedBytes(const void *s, size_t src_len);
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_StreamGDBRemote_h_
OpenPOWER on IntegriCloud