48 if (new_size <
m_data.max_size())
54 const uint8_t *src_u8 =
static_cast<const uint8_t *
>(src);
55 if (src && src_len > 0)
56 m_data.assign(src_u8, src_u8 + src_len);
62 m_data.insert(
m_data.end(),
static_cast<const uint8_t *
>(src),
63 static_cast<const uint8_t *
>(src) + src_len);
lldb::offset_t GetByteSize() const override
Get the number of bytes in the data buffer.
lldb::offset_t SetByteSize(lldb::offset_t byte_size)
Set the number of bytes in the data buffer.
DataBufferHeap()
Default constructor.
void AppendData(const void *src, uint64_t src_len)
void CopyData(const void *src, lldb::offset_t src_len)
Makes a copy of the src_len bytes in src.
buffer_t m_data
The heap based buffer where data is stored.
static char ID
LLVM RTTI support.
~DataBufferHeap() override
Destructor.
std::vector< uint8_t > buffer_t
}
const uint8_t * GetBytesImpl() const override
Get a const pointer to the data.
static char ID
LLVM RTTI support.
A pure virtual protocol class for abstracted read only data buffers.
const uint8_t * GetBytes() const
Get a const pointer to the data.
virtual lldb::offset_t GetByteSize() const =0
Get the number of bytes in the data buffer.
static char ID
LLVM RTTI support.
static char ID
LLVM RTTI support.
A class that represents a running process on the host machine.