]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Utility/StreamGDBRemote.h
file: update to 5.34
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Utility / StreamGDBRemote.h
1 //===-- StreamGDBRemote.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_StreamGDBRemote_h_
11 #define liblldb_StreamGDBRemote_h_
12
13 #include "lldb/Utility/StreamString.h" // for StreamString
14 #include "lldb/lldb-enumerations.h"    // for ByteOrder
15
16 #include <stddef.h> // for size_t
17 #include <stdint.h> // for uint32_t
18
19 namespace lldb_private {
20
21 class StreamGDBRemote : public StreamString {
22 public:
23   StreamGDBRemote();
24
25   StreamGDBRemote(uint32_t flags, uint32_t addr_size,
26                   lldb::ByteOrder byte_order);
27
28   ~StreamGDBRemote() override;
29
30   //------------------------------------------------------------------
31   /// Output a block of data to the stream performing GDB-remote escaping.
32   ///
33   /// @param[in] s
34   ///     A block of data.
35   ///
36   /// @param[in] src_len
37   ///     The amount of data to write.
38   ///
39   /// @return
40   ///     Number of bytes written.
41   //------------------------------------------------------------------
42   // TODO: Convert this function to take ArrayRef<uint8_t>
43   int PutEscapedBytes(const void *s, size_t src_len);
44 };
45
46 } // namespace lldb_private
47
48 #endif // liblldb_StreamGDBRemote_h_