LLDB  mainline
SBData.cpp
Go to the documentation of this file.
1 //===-- SBData.cpp --------------------------------------------------------===//
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 #include "lldb/API/SBData.h"
10 #include "lldb/API/SBError.h"
11 #include "lldb/API/SBStream.h"
13 
17 #include "lldb/Utility/Stream.h"
18 
19 #include <cinttypes>
20 #include <memory>
21 
22 using namespace lldb;
23 using namespace lldb_private;
24 
25 SBData::SBData() : m_opaque_sp(new DataExtractor()) {
26  LLDB_INSTRUMENT_VA(this);
27 }
28 
29 SBData::SBData(const lldb::DataExtractorSP &data_sp) : m_opaque_sp(data_sp) {}
30 
31 SBData::SBData(const SBData &rhs) : m_opaque_sp(rhs.m_opaque_sp) {
32  LLDB_INSTRUMENT_VA(this, rhs);
33 }
34 
35 const SBData &SBData::operator=(const SBData &rhs) {
36  LLDB_INSTRUMENT_VA(this, rhs);
37 
38  if (this != &rhs)
40  return *this;
41 }
42 
43 SBData::~SBData() = default;
44 
45 void SBData::SetOpaque(const lldb::DataExtractorSP &data_sp) {
46  m_opaque_sp = data_sp;
47 }
48 
50 
52  return m_opaque_sp.operator->();
53 }
54 
55 lldb::DataExtractorSP &SBData::operator*() { return m_opaque_sp; }
56 
57 const lldb::DataExtractorSP &SBData::operator*() const { return m_opaque_sp; }
58 
60  LLDB_INSTRUMENT_VA(this);
61  return this->operator bool();
62 }
63 SBData::operator bool() const {
64  LLDB_INSTRUMENT_VA(this);
65 
66  return m_opaque_sp.get() != nullptr;
67 }
68 
70  LLDB_INSTRUMENT_VA(this);
71 
72  uint8_t value = 0;
73  if (m_opaque_sp.get())
74  value = m_opaque_sp->GetAddressByteSize();
75  return value;
76 }
77 
78 void SBData::SetAddressByteSize(uint8_t addr_byte_size) {
79  LLDB_INSTRUMENT_VA(this, addr_byte_size);
80 
81  if (m_opaque_sp.get())
82  m_opaque_sp->SetAddressByteSize(addr_byte_size);
83 }
84 
85 void SBData::Clear() {
86  LLDB_INSTRUMENT_VA(this);
87 
88  if (m_opaque_sp.get())
89  m_opaque_sp->Clear();
90 }
91 
93  LLDB_INSTRUMENT_VA(this);
94 
95  size_t value = 0;
96  if (m_opaque_sp.get())
97  value = m_opaque_sp->GetByteSize();
98  return value;
99 }
100 
102  LLDB_INSTRUMENT_VA(this);
103 
105  if (m_opaque_sp.get())
106  value = m_opaque_sp->GetByteOrder();
107  return value;
108 }
109 
111  LLDB_INSTRUMENT_VA(this, endian);
112 
113  if (m_opaque_sp.get())
114  m_opaque_sp->SetByteOrder(endian);
115 }
116 
118  LLDB_INSTRUMENT_VA(this, error, offset);
119 
120  float value = 0;
121  if (!m_opaque_sp.get()) {
122  error.SetErrorString("no value to read from");
123  } else {
124  uint32_t old_offset = offset;
125  value = m_opaque_sp->GetFloat(&offset);
126  if (offset == old_offset)
127  error.SetErrorString("unable to read data");
128  }
129  return value;
130 }
131 
133  LLDB_INSTRUMENT_VA(this, error, offset);
134 
135  double value = 0;
136  if (!m_opaque_sp.get()) {
137  error.SetErrorString("no value to read from");
138  } else {
139  uint32_t old_offset = offset;
140  value = m_opaque_sp->GetDouble(&offset);
141  if (offset == old_offset)
142  error.SetErrorString("unable to read data");
143  }
144  return value;
145 }
146 
148  LLDB_INSTRUMENT_VA(this, error, offset);
149 
150  long double value = 0;
151  if (!m_opaque_sp.get()) {
152  error.SetErrorString("no value to read from");
153  } else {
154  uint32_t old_offset = offset;
155  value = m_opaque_sp->GetLongDouble(&offset);
156  if (offset == old_offset)
157  error.SetErrorString("unable to read data");
158  }
159  return value;
160 }
161 
163  LLDB_INSTRUMENT_VA(this, error, offset);
164 
165  lldb::addr_t value = 0;
166  if (!m_opaque_sp.get()) {
167  error.SetErrorString("no value to read from");
168  } else {
169  uint32_t old_offset = offset;
170  value = m_opaque_sp->GetAddress(&offset);
171  if (offset == old_offset)
172  error.SetErrorString("unable to read data");
173  }
174  return value;
175 }
176 
178  LLDB_INSTRUMENT_VA(this, error, offset);
179 
180  uint8_t value = 0;
181  if (!m_opaque_sp.get()) {
182  error.SetErrorString("no value to read from");
183  } else {
184  uint32_t old_offset = offset;
185  value = m_opaque_sp->GetU8(&offset);
186  if (offset == old_offset)
187  error.SetErrorString("unable to read data");
188  }
189  return value;
190 }
191 
193  LLDB_INSTRUMENT_VA(this, error, offset);
194 
195  uint16_t value = 0;
196  if (!m_opaque_sp.get()) {
197  error.SetErrorString("no value to read from");
198  } else {
199  uint32_t old_offset = offset;
200  value = m_opaque_sp->GetU16(&offset);
201  if (offset == old_offset)
202  error.SetErrorString("unable to read data");
203  }
204  return value;
205 }
206 
208  LLDB_INSTRUMENT_VA(this, error, offset);
209 
210  uint32_t value = 0;
211  if (!m_opaque_sp.get()) {
212  error.SetErrorString("no value to read from");
213  } else {
214  uint32_t old_offset = offset;
215  value = m_opaque_sp->GetU32(&offset);
216  if (offset == old_offset)
217  error.SetErrorString("unable to read data");
218  }
219  return value;
220 }
221 
223  LLDB_INSTRUMENT_VA(this, error, offset);
224 
225  uint64_t value = 0;
226  if (!m_opaque_sp.get()) {
227  error.SetErrorString("no value to read from");
228  } else {
229  uint32_t old_offset = offset;
230  value = m_opaque_sp->GetU64(&offset);
231  if (offset == old_offset)
232  error.SetErrorString("unable to read data");
233  }
234  return value;
235 }
236 
238  LLDB_INSTRUMENT_VA(this, error, offset);
239 
240  int8_t value = 0;
241  if (!m_opaque_sp.get()) {
242  error.SetErrorString("no value to read from");
243  } else {
244  uint32_t old_offset = offset;
245  value = (int8_t)m_opaque_sp->GetMaxS64(&offset, 1);
246  if (offset == old_offset)
247  error.SetErrorString("unable to read data");
248  }
249  return value;
250 }
251 
253  LLDB_INSTRUMENT_VA(this, error, offset);
254 
255  int16_t value = 0;
256  if (!m_opaque_sp.get()) {
257  error.SetErrorString("no value to read from");
258  } else {
259  uint32_t old_offset = offset;
260  value = (int16_t)m_opaque_sp->GetMaxS64(&offset, 2);
261  if (offset == old_offset)
262  error.SetErrorString("unable to read data");
263  }
264  return value;
265 }
266 
268  LLDB_INSTRUMENT_VA(this, error, offset);
269 
270  int32_t value = 0;
271  if (!m_opaque_sp.get()) {
272  error.SetErrorString("no value to read from");
273  } else {
274  uint32_t old_offset = offset;
275  value = (int32_t)m_opaque_sp->GetMaxS64(&offset, 4);
276  if (offset == old_offset)
277  error.SetErrorString("unable to read data");
278  }
279  return value;
280 }
281 
283  LLDB_INSTRUMENT_VA(this, error, offset);
284 
285  int64_t value = 0;
286  if (!m_opaque_sp.get()) {
287  error.SetErrorString("no value to read from");
288  } else {
289  uint32_t old_offset = offset;
290  value = (int64_t)m_opaque_sp->GetMaxS64(&offset, 8);
291  if (offset == old_offset)
292  error.SetErrorString("unable to read data");
293  }
294  return value;
295 }
296 
298  LLDB_INSTRUMENT_VA(this, error, offset);
299 
300  const char *value = nullptr;
301  if (!m_opaque_sp.get()) {
302  error.SetErrorString("no value to read from");
303  } else {
304  uint32_t old_offset = offset;
305  value = m_opaque_sp->GetCStr(&offset);
306  if (offset == old_offset || (value == nullptr))
307  error.SetErrorString("unable to read data");
308  }
309  return value;
310 }
311 
313  lldb::addr_t base_addr) {
314  LLDB_INSTRUMENT_VA(this, description, base_addr);
315 
316  Stream &strm = description.ref();
317 
318  if (m_opaque_sp) {
320  m_opaque_sp->GetByteSize(), 16, base_addr, 0, 0);
321  } else
322  strm.PutCString("No value");
323 
324  return true;
325 }
326 
328  void *buf, size_t size) {
329  LLDB_INSTRUMENT_VA(this, error, offset, buf, size);
330 
331  void *ok = nullptr;
332  if (!m_opaque_sp.get()) {
333  error.SetErrorString("no value to read from");
334  } else {
335  uint32_t old_offset = offset;
336  ok = m_opaque_sp->GetU8(&offset, buf, size);
337  if ((offset == old_offset) || (ok == nullptr))
338  error.SetErrorString("unable to read data");
339  }
340  return ok ? size : 0;
341 }
342 
343 void SBData::SetData(lldb::SBError &error, const void *buf, size_t size,
344  lldb::ByteOrder endian, uint8_t addr_size) {
345  LLDB_INSTRUMENT_VA(this, error, buf, size, endian, addr_size);
346 
347  if (!m_opaque_sp.get())
348  m_opaque_sp = std::make_shared<DataExtractor>(buf, size, endian, addr_size);
349  else
350  {
351  m_opaque_sp->SetData(buf, size, endian);
352  m_opaque_sp->SetAddressByteSize(addr_size);
353  }
354 }
355 
357  size_t size, lldb::ByteOrder endian,
358  uint8_t addr_size) {
359  LLDB_INSTRUMENT_VA(this, error, buf, size, endian, addr_size);
360 
361  lldb::DataBufferSP buffer_sp = std::make_shared<DataBufferHeap>(buf, size);
362 
363  if (!m_opaque_sp.get())
364  m_opaque_sp = std::make_shared<DataExtractor>(buf, size, endian, addr_size);
365  else {
366  m_opaque_sp->SetData(buffer_sp);
367  m_opaque_sp->SetByteOrder(endian);
368  m_opaque_sp->SetAddressByteSize(addr_size);
369  }
370 }
371 
372 bool SBData::Append(const SBData &rhs) {
373  LLDB_INSTRUMENT_VA(this, rhs);
374 
375  bool value = false;
376  if (m_opaque_sp.get() && rhs.m_opaque_sp.get())
377  value = m_opaque_sp.get()->Append(*rhs.m_opaque_sp);
378  return value;
379 }
380 
382  uint32_t addr_byte_size,
383  const char *data) {
384  LLDB_INSTRUMENT_VA(endian, addr_byte_size, data);
385 
386  if (!data || !data[0])
387  return SBData();
388 
389  uint32_t data_len = strlen(data);
390 
391  lldb::DataBufferSP buffer_sp(new DataBufferHeap(data, data_len));
392  lldb::DataExtractorSP data_sp(
393  new DataExtractor(buffer_sp, endian, addr_byte_size));
394 
395  SBData ret(data_sp);
396 
397  return ret;
398 }
399 
401  uint32_t addr_byte_size,
402  uint64_t *array,
403  size_t array_len) {
404  LLDB_INSTRUMENT_VA(endian, addr_byte_size, array, array_len);
405 
406  if (!array || array_len == 0)
407  return SBData();
408 
409  size_t data_len = array_len * sizeof(uint64_t);
410 
411  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
412  lldb::DataExtractorSP data_sp(
413  new DataExtractor(buffer_sp, endian, addr_byte_size));
414 
415  SBData ret(data_sp);
416 
417  return ret;
418 }
419 
421  uint32_t addr_byte_size,
422  uint32_t *array,
423  size_t array_len) {
424  LLDB_INSTRUMENT_VA(endian, addr_byte_size, array, array_len);
425 
426  if (!array || array_len == 0)
427  return SBData();
428 
429  size_t data_len = array_len * sizeof(uint32_t);
430 
431  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
432  lldb::DataExtractorSP data_sp(
433  new DataExtractor(buffer_sp, endian, addr_byte_size));
434 
435  SBData ret(data_sp);
436 
437  return ret;
438 }
439 
441  uint32_t addr_byte_size,
442  int64_t *array,
443  size_t array_len) {
444  LLDB_INSTRUMENT_VA(endian, addr_byte_size, array, array_len);
445 
446  if (!array || array_len == 0)
447  return SBData();
448 
449  size_t data_len = array_len * sizeof(int64_t);
450 
451  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
452  lldb::DataExtractorSP data_sp(
453  new DataExtractor(buffer_sp, endian, addr_byte_size));
454 
455  SBData ret(data_sp);
456 
457  return ret;
458 }
459 
461  uint32_t addr_byte_size,
462  int32_t *array,
463  size_t array_len) {
464  LLDB_INSTRUMENT_VA(endian, addr_byte_size, array, array_len);
465 
466  if (!array || array_len == 0)
467  return SBData();
468 
469  size_t data_len = array_len * sizeof(int32_t);
470 
471  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
472  lldb::DataExtractorSP data_sp(
473  new DataExtractor(buffer_sp, endian, addr_byte_size));
474 
475  SBData ret(data_sp);
476 
477  return ret;
478 }
479 
481  uint32_t addr_byte_size,
482  double *array,
483  size_t array_len) {
484  LLDB_INSTRUMENT_VA(endian, addr_byte_size, array, array_len);
485 
486  if (!array || array_len == 0)
487  return SBData();
488 
489  size_t data_len = array_len * sizeof(double);
490 
491  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
492  lldb::DataExtractorSP data_sp(
493  new DataExtractor(buffer_sp, endian, addr_byte_size));
494 
495  SBData ret(data_sp);
496 
497  return ret;
498 }
499 
500 bool SBData::SetDataFromCString(const char *data) {
501  LLDB_INSTRUMENT_VA(this, data);
502 
503  if (!data) {
504  return false;
505  }
506 
507  size_t data_len = strlen(data);
508 
509  lldb::DataBufferSP buffer_sp(new DataBufferHeap(data, data_len));
510 
511  if (!m_opaque_sp.get())
512  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
514  else
515  m_opaque_sp->SetData(buffer_sp);
516 
517 
518  return true;
519 }
520 
521 bool SBData::SetDataFromUInt64Array(uint64_t *array, size_t array_len) {
522  LLDB_INSTRUMENT_VA(this, array, array_len);
523 
524  if (!array || array_len == 0) {
525  return false;
526  }
527 
528  size_t data_len = array_len * sizeof(uint64_t);
529 
530  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
531 
532  if (!m_opaque_sp.get())
533  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
535  else
536  m_opaque_sp->SetData(buffer_sp);
537 
538 
539  return true;
540 }
541 
542 bool SBData::SetDataFromUInt32Array(uint32_t *array, size_t array_len) {
543  LLDB_INSTRUMENT_VA(this, array, array_len);
544 
545  if (!array || array_len == 0) {
546  return false;
547  }
548 
549  size_t data_len = array_len * sizeof(uint32_t);
550 
551  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
552 
553  if (!m_opaque_sp.get())
554  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
556  else
557  m_opaque_sp->SetData(buffer_sp);
558 
559  return true;
560 }
561 
562 bool SBData::SetDataFromSInt64Array(int64_t *array, size_t array_len) {
563  LLDB_INSTRUMENT_VA(this, array, array_len);
564 
565  if (!array || array_len == 0) {
566  return false;
567  }
568 
569  size_t data_len = array_len * sizeof(int64_t);
570 
571  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
572 
573  if (!m_opaque_sp.get())
574  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
576  else
577  m_opaque_sp->SetData(buffer_sp);
578 
579  return true;
580 }
581 
582 bool SBData::SetDataFromSInt32Array(int32_t *array, size_t array_len) {
583  LLDB_INSTRUMENT_VA(this, array, array_len);
584 
585  if (!array || array_len == 0) {
586  return false;
587  }
588 
589  size_t data_len = array_len * sizeof(int32_t);
590 
591  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
592 
593  if (!m_opaque_sp.get())
594  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
596  else
597  m_opaque_sp->SetData(buffer_sp);
598 
599  return true;
600 }
601 
602 bool SBData::SetDataFromDoubleArray(double *array, size_t array_len) {
603  LLDB_INSTRUMENT_VA(this, array, array_len);
604 
605  if (!array || array_len == 0) {
606  return false;
607  }
608 
609  size_t data_len = array_len * sizeof(double);
610 
611  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
612 
613  if (!m_opaque_sp.get())
614  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
616  else
617  m_opaque_sp->SetData(buffer_sp);
618 
619  return true;
620 }
lldb::SBData::GetSignedInt64
int64_t GetSignedInt64(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:282
Instrumentation.h
lldb::SBData::GetLongDouble
long double GetLongDouble(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:147
lldb::SBStream::ref
lldb_private::Stream & ref()
Definition: SBStream.cpp:176
lldb::SBData::GetByteSize
size_t GetByteSize()
Definition: SBData.cpp:92
lldb::SBError
Definition: SBError.h:20
lldb::SBData::CreateDataFromDoubleArray
static lldb::SBData CreateDataFromDoubleArray(lldb::ByteOrder endian, uint32_t addr_byte_size, double *array, size_t array_len)
Definition: SBData.cpp:480
lldb::SBData::SBData
SBData()
Definition: SBData.cpp:25
lldb::SBData::SetAddressByteSize
void SetAddressByteSize(uint8_t addr_byte_size)
Definition: SBData.cpp:78
lldb::SBData::GetSignedInt8
int8_t GetSignedInt8(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:237
lldb::SBData::GetDescription
bool GetDescription(lldb::SBStream &description, lldb::addr_t base_addr=LLDB_INVALID_ADDRESS)
Definition: SBData.cpp:312
lldb::offset_t
uint64_t offset_t
Definition: lldb-types.h:87
lldb::SBData::GetByteOrder
lldb::ByteOrder GetByteOrder()
Definition: SBData.cpp:101
lldb_private::Stream
Definition: Stream.h:28
lldb::eFormatBytesWithASCII
@ eFormatBytesWithASCII
Definition: lldb-enumerations.h:162
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb::SBData::CreateDataFromCString
static lldb::SBData CreateDataFromCString(lldb::ByteOrder endian, uint32_t addr_byte_size, const char *data)
Definition: SBData.cpp:381
lldb_private::DumpDataExtractor
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.
Definition: DumpDataExtractor.cpp:342
lldb::SBData::GetString
const char * GetString(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:297
lldb::SBData::operator=
const SBData & operator=(const SBData &rhs)
Definition: SBData.cpp:35
SBData.h
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb::SBData::operator->
lldb_private::DataExtractor * operator->() const
Definition: SBData.cpp:51
SBStream.h
lldb_private::DataExtractor
Definition: DataExtractor.h:48
lldb::SBData::GetFloat
float GetFloat(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:117
lldb::SBData::SetDataFromDoubleArray
bool SetDataFromDoubleArray(double *array, size_t array_len)
Definition: SBData.cpp:602
lldb::SBData::GetSignedInt16
int16_t GetSignedInt16(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:252
lldb::SBData::~SBData
~SBData()
lldb::SBData::SetDataFromSInt64Array
bool SetDataFromSInt64Array(int64_t *array, size_t array_len)
Definition: SBData.cpp:562
lldb::SBData::GetDouble
double GetDouble(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:132
DumpDataExtractor.h
lldb::SBData::ReadRawData
size_t ReadRawData(lldb::SBError &error, lldb::offset_t offset, void *buf, size_t size)
Definition: SBData.cpp:327
lldb::SBData::GetUnsignedInt8
uint8_t GetUnsignedInt8(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:177
lldb::SBData::SetDataFromUInt32Array
bool SetDataFromUInt32Array(uint32_t *array, size_t array_len)
Definition: SBData.cpp:542
lldb::SBData::CreateDataFromSInt32Array
static lldb::SBData CreateDataFromSInt32Array(lldb::ByteOrder endian, uint32_t addr_byte_size, int32_t *array, size_t array_len)
Definition: SBData.cpp:460
lldb::SBData::Clear
void Clear()
Definition: SBData.cpp:85
lldb::SBData::GetUnsignedInt32
uint32_t GetUnsignedInt32(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:207
lldb::SBData::SetOpaque
void SetOpaque(const lldb::DataExtractorSP &data_sp)
Definition: SBData.cpp:45
lldb::SBData::GetUnsignedInt16
uint16_t GetUnsignedInt16(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:192
lldb::SBData::SetByteOrder
void SetByteOrder(lldb::ByteOrder endian)
Definition: SBData.cpp:110
lldb::SBData::m_opaque_sp
lldb::DataExtractorSP m_opaque_sp
Definition: SBData.h:159
lldb::eByteOrderInvalid
@ eByteOrderInvalid
Definition: lldb-enumerations.h:140
uint32_t
lldb::SBData::Append
bool Append(const SBData &rhs)
Definition: SBData.cpp:372
lldb::SBData::SetDataWithOwnership
void SetDataWithOwnership(lldb::SBError &error, const void *buf, size_t size, lldb::ByteOrder endian, uint8_t addr_size)
Definition: SBData.cpp:356
lldb::SBData::GetUnsignedInt64
uint64_t GetUnsignedInt64(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:222
lldb::SBData
Definition: SBData.h:20
lldb::SBData::CreateDataFromSInt64Array
static lldb::SBData CreateDataFromSInt64Array(lldb::ByteOrder endian, uint32_t addr_byte_size, int64_t *array, size_t array_len)
Definition: SBData.cpp:440
lldb::SBData::IsValid
bool IsValid()
Definition: SBData.cpp:59
uint16_t
DataExtractor.h
lldb::SBData::CreateDataFromUInt64Array
static lldb::SBData CreateDataFromUInt64Array(lldb::ByteOrder endian, uint32_t addr_byte_size, uint64_t *array, size_t array_len)
Definition: SBData.cpp:400
lldb::SBData::GetAddress
lldb::addr_t GetAddress(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:162
lldb::SBData::CreateDataFromUInt32Array
static lldb::SBData CreateDataFromUInt32Array(lldb::ByteOrder endian, uint32_t addr_byte_size, uint32_t *array, size_t array_len)
Definition: SBData.cpp:420
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb::SBData::SetDataFromSInt32Array
bool SetDataFromSInt32Array(int32_t *array, size_t array_len)
Definition: SBData.cpp:582
lldb::SBData::get
lldb_private::DataExtractor * get() const
Definition: SBData.cpp:49
lldb::SBData::GetAddressByteSize
uint8_t GetAddressByteSize()
Definition: SBData.cpp:69
LLDB_INSTRUMENT_VA
#define LLDB_INSTRUMENT_VA(...)
Definition: Instrumentation.h:98
lldb::SBData::SetData
void SetData(lldb::SBError &error, const void *buf, size_t size, lldb::ByteOrder endian, uint8_t addr_size)
Definition: SBData.cpp:343
lldb::SBData::GetSignedInt32
int32_t GetSignedInt32(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:267
Stream.h
lldb_private::Stream::PutCString
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Definition: Stream.cpp:63
lldb::SBStream
Definition: SBStream.h:18
lldb_private::DataBufferHeap
Definition: DataBufferHeap.h:30
lldb
Definition: SBAddress.h:15
lldb::SBData::SetDataFromUInt64Array
bool SetDataFromUInt64Array(uint64_t *array, size_t array_len)
Definition: SBData.cpp:521
SBError.h
DataBufferHeap.h
lldb::SBData::operator*
lldb::DataExtractorSP & operator*()
Definition: SBData.cpp:55
lldb::SBData::SetDataFromCString
bool SetDataFromCString(const char *data)
Definition: SBData.cpp:500
lldb::ByteOrder
ByteOrder
Byte ordering definitions.
Definition: lldb-enumerations.h:139