Andrew Walbran | 3d2c197 | 2020-04-07 12:24:26 +0100 | [diff] [blame^] | 1 | //===-- StreamGDBRemote.h ----------------------------------------*- C++-*-===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef liblldb_StreamGDBRemote_h_ |
| 10 | #define liblldb_StreamGDBRemote_h_ |
| 11 | |
| 12 | #include "lldb/Utility/StreamString.h" |
| 13 | #include "lldb/lldb-enumerations.h" |
| 14 | |
| 15 | #include <stddef.h> |
| 16 | #include <stdint.h> |
| 17 | |
| 18 | namespace lldb_private { |
| 19 | |
| 20 | class StreamGDBRemote : public StreamString { |
| 21 | public: |
| 22 | StreamGDBRemote(); |
| 23 | |
| 24 | StreamGDBRemote(uint32_t flags, uint32_t addr_size, |
| 25 | lldb::ByteOrder byte_order); |
| 26 | |
| 27 | ~StreamGDBRemote() override; |
| 28 | |
| 29 | /// Output a block of data to the stream performing GDB-remote escaping. |
| 30 | /// |
| 31 | /// \param[in] s |
| 32 | /// A block of data. |
| 33 | /// |
| 34 | /// \param[in] src_len |
| 35 | /// The amount of data to write. |
| 36 | /// |
| 37 | /// \return |
| 38 | /// Number of bytes written. |
| 39 | // TODO: Convert this function to take ArrayRef<uint8_t> |
| 40 | int PutEscapedBytes(const void *s, size_t src_len); |
| 41 | }; |
| 42 | |
| 43 | } // namespace lldb_private |
| 44 | |
| 45 | #endif // liblldb_StreamGDBRemote_h_ |