62 return this->
operator bool();
64SBData::operator
bool()
const {
123 error.SetErrorString(
"no value to read from");
125 uint32_t old_offset = offset;
127 if (offset == old_offset)
128 error.SetErrorString(
"unable to read data");
138 error.SetErrorString(
"no value to read from");
140 uint32_t old_offset = offset;
142 if (offset == old_offset)
143 error.SetErrorString(
"unable to read data");
151 long double value = 0;
153 error.SetErrorString(
"no value to read from");
155 uint32_t old_offset = offset;
157 if (offset == old_offset)
158 error.SetErrorString(
"unable to read data");
168 error.SetErrorString(
"no value to read from");
170 uint32_t old_offset = offset;
172 if (offset == old_offset)
173 error.SetErrorString(
"unable to read data");
183 error.SetErrorString(
"no value to read from");
185 uint32_t old_offset = offset;
187 if (offset == old_offset)
188 error.SetErrorString(
"unable to read data");
198 error.SetErrorString(
"no value to read from");
200 uint32_t old_offset = offset;
202 if (offset == old_offset)
203 error.SetErrorString(
"unable to read data");
213 error.SetErrorString(
"no value to read from");
215 uint32_t old_offset = offset;
217 if (offset == old_offset)
218 error.SetErrorString(
"unable to read data");
228 error.SetErrorString(
"no value to read from");
230 uint32_t old_offset = offset;
232 if (offset == old_offset)
233 error.SetErrorString(
"unable to read data");
243 error.SetErrorString(
"no value to read from");
245 uint32_t old_offset = offset;
246 value = (int8_t)
m_opaque_sp->GetMaxS64(&offset, 1);
247 if (offset == old_offset)
248 error.SetErrorString(
"unable to read data");
258 error.SetErrorString(
"no value to read from");
260 uint32_t old_offset = offset;
261 value = (int16_t)
m_opaque_sp->GetMaxS64(&offset, 2);
262 if (offset == old_offset)
263 error.SetErrorString(
"unable to read data");
273 error.SetErrorString(
"no value to read from");
275 uint32_t old_offset = offset;
276 value = (int32_t)
m_opaque_sp->GetMaxS64(&offset, 4);
277 if (offset == old_offset)
278 error.SetErrorString(
"unable to read data");
288 error.SetErrorString(
"no value to read from");
290 uint32_t old_offset = offset;
291 value = (int64_t)
m_opaque_sp->GetMaxS64(&offset, 8);
292 if (offset == old_offset)
293 error.SetErrorString(
"unable to read data");
302 error.SetErrorString(
"no value to read from");
308 if (offset == old_offset || value ==
nullptr) {
309 error.SetErrorString(
"unable to read data");
332 void *buf,
size_t size) {
337 error.SetErrorString(
"no value to read from");
339 uint32_t old_offset = offset;
341 if ((offset == old_offset) || (ok ==
nullptr))
342 error.SetErrorString(
"unable to read data");
344 return ok ? size : 0;
386 uint32_t addr_byte_size,
390 if (!data || !data[0])
393 uint32_t data_len = strlen(data);
405 uint32_t addr_byte_size,
410 if (!array || array_len == 0)
413 size_t data_len = array_len *
sizeof(uint64_t);
425 uint32_t addr_byte_size,
430 if (!array || array_len == 0)
433 size_t data_len = array_len *
sizeof(uint32_t);
445 uint32_t addr_byte_size,
450 if (!array || array_len == 0)
453 size_t data_len = array_len *
sizeof(int64_t);
465 uint32_t addr_byte_size,
470 if (!array || array_len == 0)
473 size_t data_len = array_len *
sizeof(int32_t);
485 uint32_t addr_byte_size,
490 if (!array || array_len == 0)
493 size_t data_len = array_len *
sizeof(double);
511 size_t data_len = strlen(data);
528 if (!array || array_len == 0) {
532 size_t data_len = array_len *
sizeof(uint64_t);
549 if (!array || array_len == 0) {
553 size_t data_len = array_len *
sizeof(uint32_t);
569 if (!array || array_len == 0) {
573 size_t data_len = array_len *
sizeof(int64_t);
589 if (!array || array_len == 0) {
593 size_t data_len = array_len *
sizeof(int32_t);
609 if (!array || array_len == 0) {
613 size_t data_len = array_len *
sizeof(double);
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_INSTRUMENT_VA(...)
void SetDataWithOwnership(lldb::SBError &error, const void *buf, size_t size, lldb::ByteOrder endian, uint8_t addr_size)
lldb_private::DataExtractor * get() const
lldb::ByteOrder GetByteOrder()
void SetByteOrder(lldb::ByteOrder endian)
uint8_t GetUnsignedInt8(lldb::SBError &error, lldb::offset_t offset)
uint64_t GetUnsignedInt64(lldb::SBError &error, lldb::offset_t offset)
uint8_t GetAddressByteSize()
double GetDouble(lldb::SBError &error, lldb::offset_t offset)
bool SetDataFromSInt64Array(int64_t *array, size_t array_len)
size_t ReadRawData(lldb::SBError &error, lldb::offset_t offset, void *buf, size_t size)
static lldb::SBData CreateDataFromSInt64Array(lldb::ByteOrder endian, uint32_t addr_byte_size, int64_t *array, size_t array_len)
int8_t GetSignedInt8(lldb::SBError &error, lldb::offset_t offset)
bool Append(const SBData &rhs)
bool GetDescription(lldb::SBStream &description, lldb::addr_t base_addr=LLDB_INVALID_ADDRESS)
int16_t GetSignedInt16(lldb::SBError &error, lldb::offset_t offset)
lldb_private::DataExtractor * operator->() const
lldb::addr_t GetAddress(lldb::SBError &error, lldb::offset_t offset)
bool SetDataFromUInt32Array(uint32_t *array, size_t array_len)
void SetAddressByteSize(uint8_t addr_byte_size)
const char * GetString(lldb::SBError &error, lldb::offset_t offset)
uint32_t GetUnsignedInt32(lldb::SBError &error, lldb::offset_t offset)
static lldb::SBData CreateDataFromCString(lldb::ByteOrder endian, uint32_t addr_byte_size, const char *data)
static lldb::SBData CreateDataFromUInt32Array(lldb::ByteOrder endian, uint32_t addr_byte_size, uint32_t *array, size_t array_len)
bool SetDataFromCString(const char *data)
int32_t GetSignedInt32(lldb::SBError &error, lldb::offset_t offset)
void SetOpaque(const lldb::DataExtractorSP &data_sp)
static lldb::SBData CreateDataFromDoubleArray(lldb::ByteOrder endian, uint32_t addr_byte_size, double *array, size_t array_len)
bool SetDataFromUInt64Array(uint64_t *array, size_t array_len)
lldb::DataExtractorSP & operator*()
static lldb::SBData CreateDataFromUInt64Array(lldb::ByteOrder endian, uint32_t addr_byte_size, uint64_t *array, size_t array_len)
bool SetDataFromDoubleArray(double *array, size_t array_len)
uint16_t GetUnsignedInt16(lldb::SBError &error, lldb::offset_t offset)
long double GetLongDouble(lldb::SBError &error, lldb::offset_t offset)
float GetFloat(lldb::SBError &error, lldb::offset_t offset)
const SBData & operator=(const SBData &rhs)
static lldb::SBData CreateDataFromSInt32Array(lldb::ByteOrder endian, uint32_t addr_byte_size, int32_t *array, size_t array_len)
int64_t GetSignedInt64(lldb::SBError &error, lldb::offset_t offset)
bool SetDataFromSInt32Array(int32_t *array, size_t array_len)
void SetData(lldb::SBError &error, const void *buf, size_t size, lldb::ByteOrder endian, uint8_t addr_size)
lldb::DataExtractorSP m_opaque_sp
lldb_private::Stream & ref()
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
A subclass of DataBuffer that stores a data buffer on the heap.
A stream class that can stream formatted output to a file.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
A class that represents a running process on the host machine.
lldb::offset_t DumpDataExtractor(const DataExtractor &DE, Stream *s, lldb::offset_t offset, lldb::Format item_format, size_t item_byte_size, size_t item_count, size_t num_per_line, uint64_t base_addr, uint32_t item_bit_size, uint32_t item_bit_offset, ExecutionContextScope *exe_scope=nullptr, bool show_memory_tags=false)
Dumps item_count objects into the stream s.
ByteOrder
Byte ordering definitions.
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::DataExtractor > DataExtractorSP