63 return this->
operator bool();
65SBData::operator
bool()
const {
124 error.SetErrorString(
"no value to read from");
126 uint32_t old_offset = offset;
128 if (offset == old_offset)
129 error.SetErrorString(
"unable to read data");
139 error.SetErrorString(
"no value to read from");
141 uint32_t old_offset = offset;
143 if (offset == old_offset)
144 error.SetErrorString(
"unable to read data");
152 long double value = 0;
154 error.SetErrorString(
"no value to read from");
156 uint32_t old_offset = offset;
158 if (offset == old_offset)
159 error.SetErrorString(
"unable to read data");
169 error.SetErrorString(
"no value to read from");
171 uint32_t old_offset = offset;
173 if (offset == old_offset)
174 error.SetErrorString(
"unable to read data");
184 error.SetErrorString(
"no value to read from");
186 uint32_t old_offset = offset;
188 if (offset == old_offset)
189 error.SetErrorString(
"unable to read data");
199 error.SetErrorString(
"no value to read from");
201 uint32_t old_offset = offset;
203 if (offset == old_offset)
204 error.SetErrorString(
"unable to read data");
214 error.SetErrorString(
"no value to read from");
216 uint32_t old_offset = offset;
218 if (offset == old_offset)
219 error.SetErrorString(
"unable to read data");
229 error.SetErrorString(
"no value to read from");
231 uint32_t old_offset = offset;
233 if (offset == old_offset)
234 error.SetErrorString(
"unable to read data");
244 error.SetErrorString(
"no value to read from");
246 uint32_t old_offset = offset;
247 value = (int8_t)
m_opaque_sp->GetMaxS64(&offset, 1);
248 if (offset == old_offset)
249 error.SetErrorString(
"unable to read data");
259 error.SetErrorString(
"no value to read from");
261 uint32_t old_offset = offset;
262 value = (int16_t)
m_opaque_sp->GetMaxS64(&offset, 2);
263 if (offset == old_offset)
264 error.SetErrorString(
"unable to read data");
274 error.SetErrorString(
"no value to read from");
276 uint32_t old_offset = offset;
277 value = (int32_t)
m_opaque_sp->GetMaxS64(&offset, 4);
278 if (offset == old_offset)
279 error.SetErrorString(
"unable to read data");
289 error.SetErrorString(
"no value to read from");
291 uint32_t old_offset = offset;
292 value = (int64_t)
m_opaque_sp->GetMaxS64(&offset, 8);
293 if (offset == old_offset)
294 error.SetErrorString(
"unable to read data");
303 error.SetErrorString(
"no value to read from");
309 if (offset == old_offset || value ==
nullptr) {
310 error.SetErrorString(
"unable to read data");
333 void *buf,
size_t size) {
338 error.SetErrorString(
"no value to read from");
340 uint32_t old_offset = offset;
342 if ((offset == old_offset) || (ok ==
nullptr))
343 error.SetErrorString(
"unable to read data");
345 return ok ? size : 0;
385 uint32_t addr_byte_size,
389 if (!data || !data[0])
392 uint32_t data_len = strlen(data);
404 uint32_t addr_byte_size,
409 if (!array || array_len == 0)
412 size_t data_len = array_len *
sizeof(uint64_t);
424 uint32_t addr_byte_size,
429 if (!array || array_len == 0)
432 size_t data_len = array_len *
sizeof(uint32_t);
444 uint32_t addr_byte_size,
449 if (!array || array_len == 0)
452 size_t data_len = array_len *
sizeof(int64_t);
464 uint32_t addr_byte_size,
469 if (!array || array_len == 0)
472 size_t data_len = array_len *
sizeof(int32_t);
484 uint32_t addr_byte_size,
489 if (!array || array_len == 0)
492 size_t data_len = array_len *
sizeof(double);
510 size_t data_len = strlen(data);
526 if (!array || array_len == 0) {
530 size_t data_len = array_len *
sizeof(uint64_t);
546 if (!array || array_len == 0) {
550 size_t data_len = array_len *
sizeof(uint32_t);
566 if (!array || array_len == 0) {
570 size_t data_len = array_len *
sizeof(int64_t);
586 if (!array || array_len == 0) {
590 size_t data_len = array_len *
sizeof(int32_t);
606 if (!array || array_len == 0) {
610 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 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.
const char * Intern(llvm::StringRef str) const
static StringPoolRef GetSystemPool()
The system pool. Only valid between Initialize and Terminate.
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