LLDB  mainline
SBData.cpp
Go to the documentation of this file.
1 //===-- SBData.cpp ----------------------------------------------*- 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 #include "lldb/API/SBData.h"
10 #include "SBReproducerPrivate.h"
11 #include "lldb/API/SBError.h"
12 #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()) {
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) {
33 }
34 
35 const SBData &SBData::operator=(const SBData &rhs) {
37  SBData, operator=,(const lldb::SBData &), rhs);
38 
39  if (this != &rhs)
40  m_opaque_sp = rhs.m_opaque_sp;
41  return LLDB_RECORD_RESULT(*this);
42 }
43 
45 
46 void SBData::SetOpaque(const lldb::DataExtractorSP &data_sp) {
47  m_opaque_sp = data_sp;
48 }
49 
50 lldb_private::DataExtractor *SBData::get() const { return m_opaque_sp.get(); }
51 
53  return m_opaque_sp.operator->();
54 }
55 
56 lldb::DataExtractorSP &SBData::operator*() { return m_opaque_sp; }
57 
58 const lldb::DataExtractorSP &SBData::operator*() const { return m_opaque_sp; }
59 
62  return this->operator bool();
63 }
64 SBData::operator bool() const {
65  LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBData, operator bool);
66 
67  return m_opaque_sp.get() != NULL;
68 }
69 
72 
73  uint8_t value = 0;
74  if (m_opaque_sp.get())
75  value = m_opaque_sp->GetAddressByteSize();
76  return value;
77 }
78 
79 void SBData::SetAddressByteSize(uint8_t addr_byte_size) {
81  addr_byte_size);
82 
83  if (m_opaque_sp.get())
84  m_opaque_sp->SetAddressByteSize(addr_byte_size);
85 }
86 
87 void SBData::Clear() {
89 
90  if (m_opaque_sp.get())
91  m_opaque_sp->Clear();
92 }
93 
96 
97  size_t value = 0;
98  if (m_opaque_sp.get())
99  value = m_opaque_sp->GetByteSize();
100  return value;
101 }
102 
105 
107  if (m_opaque_sp.get())
108  value = m_opaque_sp->GetByteOrder();
109  return value;
110 }
111 
114 
115  if (m_opaque_sp.get())
116  m_opaque_sp->SetByteOrder(endian);
117 }
118 
121  error, offset);
122 
123  float value = 0;
124  if (!m_opaque_sp.get()) {
125  error.SetErrorString("no value to read from");
126  } else {
127  uint32_t old_offset = offset;
128  value = m_opaque_sp->GetFloat(&offset);
129  if (offset == old_offset)
130  error.SetErrorString("unable to read data");
131  }
132  return value;
133 }
134 
137  (lldb::SBError &, lldb::offset_t), error, offset);
138 
139  double value = 0;
140  if (!m_opaque_sp.get()) {
141  error.SetErrorString("no value to read from");
142  } else {
143  uint32_t old_offset = offset;
144  value = m_opaque_sp->GetDouble(&offset);
145  if (offset == old_offset)
146  error.SetErrorString("unable to read data");
147  }
148  return value;
149 }
150 
153  (lldb::SBError &, lldb::offset_t), error, offset);
154 
155  long double value = 0;
156  if (!m_opaque_sp.get()) {
157  error.SetErrorString("no value to read from");
158  } else {
159  uint32_t old_offset = offset;
160  value = m_opaque_sp->GetLongDouble(&offset);
161  if (offset == old_offset)
162  error.SetErrorString("unable to read data");
163  }
164  return value;
165 }
166 
169  (lldb::SBError &, lldb::offset_t), error, offset);
170 
171  lldb::addr_t value = 0;
172  if (!m_opaque_sp.get()) {
173  error.SetErrorString("no value to read from");
174  } else {
175  uint32_t old_offset = offset;
176  value = m_opaque_sp->GetAddress(&offset);
177  if (offset == old_offset)
178  error.SetErrorString("unable to read data");
179  }
180  return value;
181 }
182 
185  (lldb::SBError &, lldb::offset_t), error, offset);
186 
187  uint8_t value = 0;
188  if (!m_opaque_sp.get()) {
189  error.SetErrorString("no value to read from");
190  } else {
191  uint32_t old_offset = offset;
192  value = m_opaque_sp->GetU8(&offset);
193  if (offset == old_offset)
194  error.SetErrorString("unable to read data");
195  }
196  return value;
197 }
198 
201  (lldb::SBError &, lldb::offset_t), error, offset);
202 
203  uint16_t value = 0;
204  if (!m_opaque_sp.get()) {
205  error.SetErrorString("no value to read from");
206  } else {
207  uint32_t old_offset = offset;
208  value = m_opaque_sp->GetU16(&offset);
209  if (offset == old_offset)
210  error.SetErrorString("unable to read data");
211  }
212  return value;
213 }
214 
217  (lldb::SBError &, lldb::offset_t), error, offset);
218 
219  uint32_t value = 0;
220  if (!m_opaque_sp.get()) {
221  error.SetErrorString("no value to read from");
222  } else {
223  uint32_t old_offset = offset;
224  value = m_opaque_sp->GetU32(&offset);
225  if (offset == old_offset)
226  error.SetErrorString("unable to read data");
227  }
228  return value;
229 }
230 
233  (lldb::SBError &, lldb::offset_t), error, offset);
234 
235  uint64_t value = 0;
236  if (!m_opaque_sp.get()) {
237  error.SetErrorString("no value to read from");
238  } else {
239  uint32_t old_offset = offset;
240  value = m_opaque_sp->GetU64(&offset);
241  if (offset == old_offset)
242  error.SetErrorString("unable to read data");
243  }
244  return value;
245 }
246 
249  (lldb::SBError &, lldb::offset_t), error, offset);
250 
251  int8_t value = 0;
252  if (!m_opaque_sp.get()) {
253  error.SetErrorString("no value to read from");
254  } else {
255  uint32_t old_offset = offset;
256  value = (int8_t)m_opaque_sp->GetMaxS64(&offset, 1);
257  if (offset == old_offset)
258  error.SetErrorString("unable to read data");
259  }
260  return value;
261 }
262 
265  (lldb::SBError &, lldb::offset_t), error, offset);
266 
267  int16_t value = 0;
268  if (!m_opaque_sp.get()) {
269  error.SetErrorString("no value to read from");
270  } else {
271  uint32_t old_offset = offset;
272  value = (int16_t)m_opaque_sp->GetMaxS64(&offset, 2);
273  if (offset == old_offset)
274  error.SetErrorString("unable to read data");
275  }
276  return value;
277 }
278 
281  (lldb::SBError &, lldb::offset_t), error, offset);
282 
283  int32_t value = 0;
284  if (!m_opaque_sp.get()) {
285  error.SetErrorString("no value to read from");
286  } else {
287  uint32_t old_offset = offset;
288  value = (int32_t)m_opaque_sp->GetMaxS64(&offset, 4);
289  if (offset == old_offset)
290  error.SetErrorString("unable to read data");
291  }
292  return value;
293 }
294 
297  (lldb::SBError &, lldb::offset_t), error, offset);
298 
299  int64_t value = 0;
300  if (!m_opaque_sp.get()) {
301  error.SetErrorString("no value to read from");
302  } else {
303  uint32_t old_offset = offset;
304  value = (int64_t)m_opaque_sp->GetMaxS64(&offset, 8);
305  if (offset == old_offset)
306  error.SetErrorString("unable to read data");
307  }
308  return value;
309 }
310 
311 const char *SBData::GetString(lldb::SBError &error, lldb::offset_t offset) {
312  LLDB_RECORD_METHOD(const char *, SBData, GetString,
313  (lldb::SBError &, lldb::offset_t), error, offset);
314 
315  const char *value = 0;
316  if (!m_opaque_sp.get()) {
317  error.SetErrorString("no value to read from");
318  } else {
319  uint32_t old_offset = offset;
320  value = m_opaque_sp->GetCStr(&offset);
321  if (offset == old_offset || (value == NULL))
322  error.SetErrorString("unable to read data");
323  }
324  return value;
325 }
326 
328  lldb::addr_t base_addr) {
330  (lldb::SBStream &, lldb::addr_t), description, base_addr);
331 
332  Stream &strm = description.ref();
333 
334  if (m_opaque_sp) {
335  DumpDataExtractor(*m_opaque_sp, &strm, 0, lldb::eFormatBytesWithASCII, 1,
336  m_opaque_sp->GetByteSize(), 16, base_addr, 0, 0);
337  } else
338  strm.PutCString("No value");
339 
340  return true;
341 }
342 
344  void *buf, size_t size) {
346  (lldb::SBError &, lldb::offset_t, void *, size_t), error,
347  offset, buf, size);
348 
349  void *ok = NULL;
350  if (!m_opaque_sp.get()) {
351  error.SetErrorString("no value to read from");
352  } else {
353  uint32_t old_offset = offset;
354  ok = m_opaque_sp->GetU8(&offset, buf, size);
355  if ((offset == old_offset) || (ok == NULL))
356  error.SetErrorString("unable to read data");
357  }
358  return ok ? size : 0;
359 }
360 
361 void SBData::SetData(lldb::SBError &error, const void *buf, size_t size,
362  lldb::ByteOrder endian, uint8_t addr_size) {
364  void, SBData, SetData,
365  (lldb::SBError &, const void *, size_t, lldb::ByteOrder, uint8_t), error,
366  buf, size, endian, addr_size);
367 
368  if (!m_opaque_sp.get())
369  m_opaque_sp = std::make_shared<DataExtractor>(buf, size, endian, addr_size);
370  else
371  {
372  m_opaque_sp->SetData(buf, size, endian);
373  m_opaque_sp->SetAddressByteSize(addr_size);
374  }
375 }
376 
377 bool SBData::Append(const SBData &rhs) {
378  LLDB_RECORD_METHOD(bool, SBData, Append, (const lldb::SBData &), rhs);
379 
380  bool value = false;
381  if (m_opaque_sp.get() && rhs.m_opaque_sp.get())
382  value = m_opaque_sp.get()->Append(*rhs.m_opaque_sp);
383  return value;
384 }
385 
387  uint32_t addr_byte_size,
388  const char *data) {
390  (lldb::ByteOrder, uint32_t, const char *), endian,
391  addr_byte_size, data);
392 
393  if (!data || !data[0])
394  return LLDB_RECORD_RESULT(SBData());
395 
396  uint32_t data_len = strlen(data);
397 
398  lldb::DataBufferSP buffer_sp(new DataBufferHeap(data, data_len));
399  lldb::DataExtractorSP data_sp(
400  new DataExtractor(buffer_sp, endian, addr_byte_size));
401 
402  SBData ret(data_sp);
403 
404  return LLDB_RECORD_RESULT(ret);
405 }
406 
408  uint32_t addr_byte_size,
409  uint64_t *array,
410  size_t array_len) {
412  (lldb::ByteOrder, uint32_t, uint64_t *, size_t),
413  endian, addr_byte_size, array, array_len);
414 
415  if (!array || array_len == 0)
416  return LLDB_RECORD_RESULT(SBData());
417 
418  size_t data_len = array_len * sizeof(uint64_t);
419 
420  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
421  lldb::DataExtractorSP data_sp(
422  new DataExtractor(buffer_sp, endian, addr_byte_size));
423 
424  SBData ret(data_sp);
425 
426  return LLDB_RECORD_RESULT(ret);
427 }
428 
430  uint32_t addr_byte_size,
431  uint32_t *array,
432  size_t array_len) {
434  (lldb::ByteOrder, uint32_t, uint32_t *, size_t),
435  endian, addr_byte_size, array, array_len);
436 
437  if (!array || array_len == 0)
438  return LLDB_RECORD_RESULT(SBData());
439 
440  size_t data_len = array_len * sizeof(uint32_t);
441 
442  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
443  lldb::DataExtractorSP data_sp(
444  new DataExtractor(buffer_sp, endian, addr_byte_size));
445 
446  SBData ret(data_sp);
447 
448  return LLDB_RECORD_RESULT(ret);
449 }
450 
452  uint32_t addr_byte_size,
453  int64_t *array,
454  size_t array_len) {
456  (lldb::ByteOrder, uint32_t, int64_t *, size_t),
457  endian, addr_byte_size, array, array_len);
458 
459  if (!array || array_len == 0)
460  return LLDB_RECORD_RESULT(SBData());
461 
462  size_t data_len = array_len * sizeof(int64_t);
463 
464  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
465  lldb::DataExtractorSP data_sp(
466  new DataExtractor(buffer_sp, endian, addr_byte_size));
467 
468  SBData ret(data_sp);
469 
470  return LLDB_RECORD_RESULT(ret);
471 }
472 
474  uint32_t addr_byte_size,
475  int32_t *array,
476  size_t array_len) {
478  (lldb::ByteOrder, uint32_t, int32_t *, size_t),
479  endian, addr_byte_size, array, array_len);
480 
481  if (!array || array_len == 0)
482  return LLDB_RECORD_RESULT(SBData());
483 
484  size_t data_len = array_len * sizeof(int32_t);
485 
486  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
487  lldb::DataExtractorSP data_sp(
488  new DataExtractor(buffer_sp, endian, addr_byte_size));
489 
490  SBData ret(data_sp);
491 
492  return LLDB_RECORD_RESULT(ret);
493 }
494 
496  uint32_t addr_byte_size,
497  double *array,
498  size_t array_len) {
500  (lldb::ByteOrder, uint32_t, double *, size_t),
501  endian, addr_byte_size, array, array_len);
502 
503  if (!array || array_len == 0)
504  return LLDB_RECORD_RESULT(SBData());
505 
506  size_t data_len = array_len * sizeof(double);
507 
508  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
509  lldb::DataExtractorSP data_sp(
510  new DataExtractor(buffer_sp, endian, addr_byte_size));
511 
512  SBData ret(data_sp);
513 
514  return LLDB_RECORD_RESULT(ret);
515 }
516 
517 bool SBData::SetDataFromCString(const char *data) {
518  LLDB_RECORD_METHOD(bool, SBData, SetDataFromCString, (const char *), data);
519 
520 
521  if (!data) {
522  return false;
523  }
524 
525  size_t data_len = strlen(data);
526 
527  lldb::DataBufferSP buffer_sp(new DataBufferHeap(data, data_len));
528 
529  if (!m_opaque_sp.get())
530  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
532  else
533  m_opaque_sp->SetData(buffer_sp);
534 
535 
536  return true;
537 }
538 
539 bool SBData::SetDataFromUInt64Array(uint64_t *array, size_t array_len) {
540  LLDB_RECORD_METHOD(bool, SBData, SetDataFromUInt64Array, (uint64_t *, size_t),
541  array, array_len);
542 
543 
544  if (!array || array_len == 0) {
545  return false;
546  }
547 
548  size_t data_len = array_len * sizeof(uint64_t);
549 
550  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
551 
552  if (!m_opaque_sp.get())
553  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
555  else
556  m_opaque_sp->SetData(buffer_sp);
557 
558 
559  return true;
560 }
561 
562 bool SBData::SetDataFromUInt32Array(uint32_t *array, size_t array_len) {
564  array, array_len);
565 
566 
567  if (!array || array_len == 0) {
568  return false;
569  }
570 
571  size_t data_len = array_len * sizeof(uint32_t);
572 
573  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
574 
575  if (!m_opaque_sp.get())
576  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
578  else
579  m_opaque_sp->SetData(buffer_sp);
580 
581  return true;
582 }
583 
584 bool SBData::SetDataFromSInt64Array(int64_t *array, size_t array_len) {
585  LLDB_RECORD_METHOD(bool, SBData, SetDataFromSInt64Array, (int64_t *, size_t),
586  array, array_len);
587 
588 
589  if (!array || array_len == 0) {
590  return false;
591  }
592 
593  size_t data_len = array_len * sizeof(int64_t);
594 
595  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
596 
597  if (!m_opaque_sp.get())
598  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
600  else
601  m_opaque_sp->SetData(buffer_sp);
602 
603  return true;
604 }
605 
606 bool SBData::SetDataFromSInt32Array(int32_t *array, size_t array_len) {
607  LLDB_RECORD_METHOD(bool, SBData, SetDataFromSInt32Array, (int32_t *, size_t),
608  array, array_len);
609 
610 
611  if (!array || array_len == 0) {
612  return false;
613  }
614 
615  size_t data_len = array_len * sizeof(int32_t);
616 
617  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
618 
619  if (!m_opaque_sp.get())
620  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
622  else
623  m_opaque_sp->SetData(buffer_sp);
624 
625  return true;
626 }
627 
628 bool SBData::SetDataFromDoubleArray(double *array, size_t array_len) {
629  LLDB_RECORD_METHOD(bool, SBData, SetDataFromDoubleArray, (double *, size_t),
630  array, array_len);
631 
632 
633  if (!array || array_len == 0) {
634  return false;
635  }
636 
637  size_t data_len = array_len * sizeof(double);
638 
639  lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
640 
641  if (!m_opaque_sp.get())
642  m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
644  else
645  m_opaque_sp->SetData(buffer_sp);
646 
647  return true;
648 }
649 
650 namespace lldb_private {
651 namespace repro {
652 
653 template <>
658  SBData, operator=,(const lldb::SBData &));
659  LLDB_REGISTER_METHOD(bool, SBData, IsValid, ());
660  LLDB_REGISTER_METHOD_CONST(bool, SBData, operator bool, ());
663  LLDB_REGISTER_METHOD(void, SBData, Clear, ());
691  LLDB_REGISTER_METHOD(const char *, SBData, GetString,
695  LLDB_REGISTER_METHOD(bool, SBData, Append, (const lldb::SBData &));
697  (lldb::ByteOrder, uint32_t, const char *));
700  (lldb::ByteOrder, uint32_t, uint64_t *, size_t));
703  (lldb::ByteOrder, uint32_t, uint32_t *, size_t));
705  (lldb::ByteOrder, uint32_t, int64_t *, size_t));
707  (lldb::ByteOrder, uint32_t, int32_t *, size_t));
709  (lldb::ByteOrder, uint32_t, double *, size_t));
710  LLDB_REGISTER_METHOD(bool, SBData, SetDataFromCString, (const char *));
712  (uint64_t *, size_t));
714  (uint32_t *, size_t));
716  (int64_t *, size_t));
718  (int32_t *, size_t));
720  (double *, size_t));
721 }
722 
723 }
724 }
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Definition: Stream.cpp:61
The registry contains a unique mapping between functions and their ID.
An data extractor class.
Definition: DataExtractor.h:47
uint16_t GetUnsignedInt16(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:199
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
#define LLDB_RECORD_CONSTRUCTOR_NO_ARGS(Class)
bool SetDataFromDoubleArray(double *array, size_t array_len)
Definition: SBData.cpp:628
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
static lldb::SBData CreateDataFromSInt32Array(lldb::ByteOrder endian, uint32_t addr_byte_size, int32_t *array, size_t array_len)
Definition: SBData.cpp:473
#define LLDB_RECORD_STATIC_METHOD(Result, Class, Method, Signature,...)
const SBData & operator=(const SBData &rhs)
Definition: SBData.cpp:35
size_t GetByteSize()
Definition: SBData.cpp:94
#define LLDB_RECORD_DUMMY(Result, Class, Method, Signature,...)
The LLDB_RECORD_DUMMY macro is special because it doesn&#39;t actually record anything.
int16_t GetSignedInt16(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:263
uint64_t GetUnsignedInt64(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:231
bool Append(const SBData &rhs)
Definition: SBData.cpp:377
void SetOpaque(const lldb::DataExtractorSP &data_sp)
Definition: SBData.cpp:46
float GetFloat(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:119
uint8_t GetAddressByteSize()
Definition: SBData.cpp:70
size_t ReadRawData(lldb::SBError &error, lldb::offset_t offset, void *buf, size_t size)
Definition: SBData.cpp:343
void SetAddressByteSize(uint8_t addr_byte_size)
Definition: SBData.cpp:79
#define LLDB_REGISTER_STATIC_METHOD(Result, Class, Method, Signature)
static lldb::SBData CreateDataFromUInt32Array(lldb::ByteOrder endian, uint32_t addr_byte_size, uint32_t *array, size_t array_len)
Definition: SBData.cpp:429
A subclass of DataBuffer that stores a data buffer on the heap.
void SetErrorString(const char *err_str)
Definition: SBError.cpp:124
long double GetLongDouble(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:151
lldb::DataExtractorSP & operator*()
Definition: SBData.cpp:56
lldb_private::DataExtractor * operator->() const
Definition: SBData.cpp:52
const char * GetString(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:311
bool GetDescription(lldb::SBStream &description, lldb::addr_t base_addr=LLDB_INVALID_ADDRESS)
Definition: SBData.cpp:327
#define LLDB_REGISTER_CONSTRUCTOR(Class, Signature)
#define LLDB_RECORD_METHOD_NO_ARGS(Result, Class, Method)
static lldb::SBData CreateDataFromCString(lldb::ByteOrder endian, uint32_t addr_byte_size, const char *data)
Definition: SBData.cpp:386
uint8_t GetUnsignedInt8(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:183
static lldb::SBData CreateDataFromUInt64Array(lldb::ByteOrder endian, uint32_t addr_byte_size, uint64_t *array, size_t array_len)
Definition: SBData.cpp:407
void RegisterMethods< SBData >(Registry &R)
Definition: SBData.cpp:654
uint64_t offset_t
Definition: lldb-types.h:87
#define LLDB_RECORD_CONSTRUCTOR(Class, Signature,...)
bool SetDataFromSInt64Array(int64_t *array, size_t array_len)
Definition: SBData.cpp:584
lldb_private::DataExtractor * get() const
Definition: SBData.cpp:50
void Clear()
Definition: SBData.cpp:87
#define LLDB_RECORD_METHOD(Result, Class, Method, Signature,...)
static lldb::SBData CreateDataFromDoubleArray(lldb::ByteOrder endian, uint32_t addr_byte_size, double *array, size_t array_len)
Definition: SBData.cpp:495
lldb_private::Stream & ref()
Definition: SBStream.cpp:162
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)
Dumps item_count objects into the stream s.
lldb::addr_t GetAddress(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:167
bool SetDataFromUInt32Array(uint32_t *array, size_t array_len)
Definition: SBData.cpp:562
double GetDouble(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:135
static lldb::SBData CreateDataFromSInt64Array(lldb::ByteOrder endian, uint32_t addr_byte_size, int64_t *array, size_t array_len)
Definition: SBData.cpp:451
uint64_t addr_t
Definition: lldb-types.h:83
bool SetDataFromUInt64Array(uint64_t *array, size_t array_len)
Definition: SBData.cpp:539
uint32_t GetUnsignedInt32(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:215
Definition: SBAddress.h:15
bool SetDataFromSInt32Array(int32_t *array, size_t array_len)
Definition: SBData.cpp:606
int64_t GetSignedInt64(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:295
bool SetDataFromCString(const char *data)
Definition: SBData.cpp:517
int8_t GetSignedInt8(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:247
#define LLDB_REGISTER_METHOD(Result, Class, Method, Signature)
#define LLDB_RECORD_METHOD_CONST_NO_ARGS(Result, Class, Method)
void SetData(lldb::SBError &error, const void *buf, size_t size, lldb::ByteOrder endian, uint8_t addr_size)
Definition: SBData.cpp:361
void SetByteOrder(lldb::ByteOrder endian)
Definition: SBData.cpp:112
#define LLDB_RECORD_RESULT(Result)
#define LLDB_REGISTER_METHOD_CONST(Result, Class, Method, Signature)
bool IsValid()
Definition: SBData.cpp:60
lldb::ByteOrder GetByteOrder()
Definition: SBData.cpp:103
int32_t GetSignedInt32(lldb::SBError &error, lldb::offset_t offset)
Definition: SBData.cpp:279