[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / lldb / source / API / SBData.cpp
blob528cd8d43ecce810f1db6588206d307d575b2096
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 //===----------------------------------------------------------------------===//
9 #include "lldb/API/SBData.h"
10 #include "SBReproducerPrivate.h"
11 #include "lldb/API/SBError.h"
12 #include "lldb/API/SBStream.h"
14 #include "lldb/Core/DumpDataExtractor.h"
15 #include "lldb/Utility/DataBufferHeap.h"
16 #include "lldb/Utility/DataExtractor.h"
17 #include "lldb/Utility/Stream.h"
19 #include <cinttypes>
20 #include <memory>
22 using namespace lldb;
23 using namespace lldb_private;
25 SBData::SBData() : m_opaque_sp(new DataExtractor()) {
26 LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBData);
29 SBData::SBData(const lldb::DataExtractorSP &data_sp) : m_opaque_sp(data_sp) {}
31 SBData::SBData(const SBData &rhs) : m_opaque_sp(rhs.m_opaque_sp) {
32 LLDB_RECORD_CONSTRUCTOR(SBData, (const lldb::SBData &), rhs);
35 const SBData &SBData::operator=(const SBData &rhs) {
36 LLDB_RECORD_METHOD(const lldb::SBData &,
37 SBData, operator=,(const lldb::SBData &), rhs);
39 if (this != &rhs)
40 m_opaque_sp = rhs.m_opaque_sp;
41 return LLDB_RECORD_RESULT(*this);
44 SBData::~SBData() {}
46 void SBData::SetOpaque(const lldb::DataExtractorSP &data_sp) {
47 m_opaque_sp = data_sp;
50 lldb_private::DataExtractor *SBData::get() const { return m_opaque_sp.get(); }
52 lldb_private::DataExtractor *SBData::operator->() const {
53 return m_opaque_sp.operator->();
56 lldb::DataExtractorSP &SBData::operator*() { return m_opaque_sp; }
58 const lldb::DataExtractorSP &SBData::operator*() const { return m_opaque_sp; }
60 bool SBData::IsValid() {
61 LLDB_RECORD_METHOD_NO_ARGS(bool, SBData, IsValid);
62 return this->operator bool();
64 SBData::operator bool() const {
65 LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBData, operator bool);
67 return m_opaque_sp.get() != nullptr;
70 uint8_t SBData::GetAddressByteSize() {
71 LLDB_RECORD_METHOD_NO_ARGS(uint8_t, SBData, GetAddressByteSize);
73 uint8_t value = 0;
74 if (m_opaque_sp.get())
75 value = m_opaque_sp->GetAddressByteSize();
76 return value;
79 void SBData::SetAddressByteSize(uint8_t addr_byte_size) {
80 LLDB_RECORD_METHOD(void, SBData, SetAddressByteSize, (uint8_t),
81 addr_byte_size);
83 if (m_opaque_sp.get())
84 m_opaque_sp->SetAddressByteSize(addr_byte_size);
87 void SBData::Clear() {
88 LLDB_RECORD_METHOD_NO_ARGS(void, SBData, Clear);
90 if (m_opaque_sp.get())
91 m_opaque_sp->Clear();
94 size_t SBData::GetByteSize() {
95 LLDB_RECORD_METHOD_NO_ARGS(size_t, SBData, GetByteSize);
97 size_t value = 0;
98 if (m_opaque_sp.get())
99 value = m_opaque_sp->GetByteSize();
100 return value;
103 lldb::ByteOrder SBData::GetByteOrder() {
104 LLDB_RECORD_METHOD_NO_ARGS(lldb::ByteOrder, SBData, GetByteOrder);
106 lldb::ByteOrder value = eByteOrderInvalid;
107 if (m_opaque_sp.get())
108 value = m_opaque_sp->GetByteOrder();
109 return value;
112 void SBData::SetByteOrder(lldb::ByteOrder endian) {
113 LLDB_RECORD_METHOD(void, SBData, SetByteOrder, (lldb::ByteOrder), endian);
115 if (m_opaque_sp.get())
116 m_opaque_sp->SetByteOrder(endian);
119 float SBData::GetFloat(lldb::SBError &error, lldb::offset_t offset) {
120 LLDB_RECORD_METHOD(float, SBData, GetFloat, (lldb::SBError &, lldb::offset_t),
121 error, offset);
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");
132 return value;
135 double SBData::GetDouble(lldb::SBError &error, lldb::offset_t offset) {
136 LLDB_RECORD_METHOD(double, SBData, GetDouble,
137 (lldb::SBError &, lldb::offset_t), error, offset);
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");
148 return value;
151 long double SBData::GetLongDouble(lldb::SBError &error, lldb::offset_t offset) {
152 LLDB_RECORD_METHOD(long double, SBData, GetLongDouble,
153 (lldb::SBError &, lldb::offset_t), error, offset);
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");
164 return value;
167 lldb::addr_t SBData::GetAddress(lldb::SBError &error, lldb::offset_t offset) {
168 LLDB_RECORD_METHOD(lldb::addr_t, SBData, GetAddress,
169 (lldb::SBError &, lldb::offset_t), error, offset);
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");
180 return value;
183 uint8_t SBData::GetUnsignedInt8(lldb::SBError &error, lldb::offset_t offset) {
184 LLDB_RECORD_METHOD(uint8_t, SBData, GetUnsignedInt8,
185 (lldb::SBError &, lldb::offset_t), error, offset);
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");
196 return value;
199 uint16_t SBData::GetUnsignedInt16(lldb::SBError &error, lldb::offset_t offset) {
200 LLDB_RECORD_METHOD(uint16_t, SBData, GetUnsignedInt16,
201 (lldb::SBError &, lldb::offset_t), error, offset);
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");
212 return value;
215 uint32_t SBData::GetUnsignedInt32(lldb::SBError &error, lldb::offset_t offset) {
216 LLDB_RECORD_METHOD(uint32_t, SBData, GetUnsignedInt32,
217 (lldb::SBError &, lldb::offset_t), error, offset);
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");
228 return value;
231 uint64_t SBData::GetUnsignedInt64(lldb::SBError &error, lldb::offset_t offset) {
232 LLDB_RECORD_METHOD(uint64_t, SBData, GetUnsignedInt64,
233 (lldb::SBError &, lldb::offset_t), error, offset);
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");
244 return value;
247 int8_t SBData::GetSignedInt8(lldb::SBError &error, lldb::offset_t offset) {
248 LLDB_RECORD_METHOD(int8_t, SBData, GetSignedInt8,
249 (lldb::SBError &, lldb::offset_t), error, offset);
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");
260 return value;
263 int16_t SBData::GetSignedInt16(lldb::SBError &error, lldb::offset_t offset) {
264 LLDB_RECORD_METHOD(int16_t, SBData, GetSignedInt16,
265 (lldb::SBError &, lldb::offset_t), error, offset);
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");
276 return value;
279 int32_t SBData::GetSignedInt32(lldb::SBError &error, lldb::offset_t offset) {
280 LLDB_RECORD_METHOD(int32_t, SBData, GetSignedInt32,
281 (lldb::SBError &, lldb::offset_t), error, offset);
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");
292 return value;
295 int64_t SBData::GetSignedInt64(lldb::SBError &error, lldb::offset_t offset) {
296 LLDB_RECORD_METHOD(int64_t, SBData, GetSignedInt64,
297 (lldb::SBError &, lldb::offset_t), error, offset);
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");
308 return value;
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);
315 const char *value = nullptr;
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 == nullptr))
322 error.SetErrorString("unable to read data");
324 return value;
327 bool SBData::GetDescription(lldb::SBStream &description,
328 lldb::addr_t base_addr) {
329 LLDB_RECORD_METHOD(bool, SBData, GetDescription,
330 (lldb::SBStream &, lldb::addr_t), description, base_addr);
332 Stream &strm = description.ref();
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");
340 return true;
343 size_t SBData::ReadRawData(lldb::SBError &error, lldb::offset_t offset,
344 void *buf, size_t size) {
345 LLDB_RECORD_DUMMY(size_t, SBData, ReadRawData,
346 (lldb::SBError &, lldb::offset_t, void *, size_t), error,
347 offset, buf, size);
349 void *ok = nullptr;
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 == nullptr))
356 error.SetErrorString("unable to read data");
358 return ok ? size : 0;
361 void SBData::SetData(lldb::SBError &error, const void *buf, size_t size,
362 lldb::ByteOrder endian, uint8_t addr_size) {
363 LLDB_RECORD_DUMMY(
364 void, SBData, SetData,
365 (lldb::SBError &, const void *, size_t, lldb::ByteOrder, uint8_t), error,
366 buf, size, endian, addr_size);
368 if (!m_opaque_sp.get())
369 m_opaque_sp = std::make_shared<DataExtractor>(buf, size, endian, addr_size);
370 else
372 m_opaque_sp->SetData(buf, size, endian);
373 m_opaque_sp->SetAddressByteSize(addr_size);
377 bool SBData::Append(const SBData &rhs) {
378 LLDB_RECORD_METHOD(bool, SBData, Append, (const lldb::SBData &), rhs);
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;
386 lldb::SBData SBData::CreateDataFromCString(lldb::ByteOrder endian,
387 uint32_t addr_byte_size,
388 const char *data) {
389 LLDB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromCString,
390 (lldb::ByteOrder, uint32_t, const char *), endian,
391 addr_byte_size, data);
393 if (!data || !data[0])
394 return LLDB_RECORD_RESULT(SBData());
396 uint32_t data_len = strlen(data);
398 lldb::DataBufferSP buffer_sp(new DataBufferHeap(data, data_len));
399 lldb::DataExtractorSP data_sp(
400 new DataExtractor(buffer_sp, endian, addr_byte_size));
402 SBData ret(data_sp);
404 return LLDB_RECORD_RESULT(ret);
407 lldb::SBData SBData::CreateDataFromUInt64Array(lldb::ByteOrder endian,
408 uint32_t addr_byte_size,
409 uint64_t *array,
410 size_t array_len) {
411 LLDB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromUInt64Array,
412 (lldb::ByteOrder, uint32_t, uint64_t *, size_t),
413 endian, addr_byte_size, array, array_len);
415 if (!array || array_len == 0)
416 return LLDB_RECORD_RESULT(SBData());
418 size_t data_len = array_len * sizeof(uint64_t);
420 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
421 lldb::DataExtractorSP data_sp(
422 new DataExtractor(buffer_sp, endian, addr_byte_size));
424 SBData ret(data_sp);
426 return LLDB_RECORD_RESULT(ret);
429 lldb::SBData SBData::CreateDataFromUInt32Array(lldb::ByteOrder endian,
430 uint32_t addr_byte_size,
431 uint32_t *array,
432 size_t array_len) {
433 LLDB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromUInt32Array,
434 (lldb::ByteOrder, uint32_t, uint32_t *, size_t),
435 endian, addr_byte_size, array, array_len);
437 if (!array || array_len == 0)
438 return LLDB_RECORD_RESULT(SBData());
440 size_t data_len = array_len * sizeof(uint32_t);
442 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
443 lldb::DataExtractorSP data_sp(
444 new DataExtractor(buffer_sp, endian, addr_byte_size));
446 SBData ret(data_sp);
448 return LLDB_RECORD_RESULT(ret);
451 lldb::SBData SBData::CreateDataFromSInt64Array(lldb::ByteOrder endian,
452 uint32_t addr_byte_size,
453 int64_t *array,
454 size_t array_len) {
455 LLDB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromSInt64Array,
456 (lldb::ByteOrder, uint32_t, int64_t *, size_t),
457 endian, addr_byte_size, array, array_len);
459 if (!array || array_len == 0)
460 return LLDB_RECORD_RESULT(SBData());
462 size_t data_len = array_len * sizeof(int64_t);
464 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
465 lldb::DataExtractorSP data_sp(
466 new DataExtractor(buffer_sp, endian, addr_byte_size));
468 SBData ret(data_sp);
470 return LLDB_RECORD_RESULT(ret);
473 lldb::SBData SBData::CreateDataFromSInt32Array(lldb::ByteOrder endian,
474 uint32_t addr_byte_size,
475 int32_t *array,
476 size_t array_len) {
477 LLDB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromSInt32Array,
478 (lldb::ByteOrder, uint32_t, int32_t *, size_t),
479 endian, addr_byte_size, array, array_len);
481 if (!array || array_len == 0)
482 return LLDB_RECORD_RESULT(SBData());
484 size_t data_len = array_len * sizeof(int32_t);
486 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
487 lldb::DataExtractorSP data_sp(
488 new DataExtractor(buffer_sp, endian, addr_byte_size));
490 SBData ret(data_sp);
492 return LLDB_RECORD_RESULT(ret);
495 lldb::SBData SBData::CreateDataFromDoubleArray(lldb::ByteOrder endian,
496 uint32_t addr_byte_size,
497 double *array,
498 size_t array_len) {
499 LLDB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromDoubleArray,
500 (lldb::ByteOrder, uint32_t, double *, size_t),
501 endian, addr_byte_size, array, array_len);
503 if (!array || array_len == 0)
504 return LLDB_RECORD_RESULT(SBData());
506 size_t data_len = array_len * sizeof(double);
508 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
509 lldb::DataExtractorSP data_sp(
510 new DataExtractor(buffer_sp, endian, addr_byte_size));
512 SBData ret(data_sp);
514 return LLDB_RECORD_RESULT(ret);
517 bool SBData::SetDataFromCString(const char *data) {
518 LLDB_RECORD_METHOD(bool, SBData, SetDataFromCString, (const char *), data);
521 if (!data) {
522 return false;
525 size_t data_len = strlen(data);
527 lldb::DataBufferSP buffer_sp(new DataBufferHeap(data, data_len));
529 if (!m_opaque_sp.get())
530 m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
531 GetAddressByteSize());
532 else
533 m_opaque_sp->SetData(buffer_sp);
536 return true;
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);
544 if (!array || array_len == 0) {
545 return false;
548 size_t data_len = array_len * sizeof(uint64_t);
550 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
552 if (!m_opaque_sp.get())
553 m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
554 GetAddressByteSize());
555 else
556 m_opaque_sp->SetData(buffer_sp);
559 return true;
562 bool SBData::SetDataFromUInt32Array(uint32_t *array, size_t array_len) {
563 LLDB_RECORD_METHOD(bool, SBData, SetDataFromUInt32Array, (uint32_t *, size_t),
564 array, array_len);
567 if (!array || array_len == 0) {
568 return false;
571 size_t data_len = array_len * sizeof(uint32_t);
573 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
575 if (!m_opaque_sp.get())
576 m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
577 GetAddressByteSize());
578 else
579 m_opaque_sp->SetData(buffer_sp);
581 return true;
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);
589 if (!array || array_len == 0) {
590 return false;
593 size_t data_len = array_len * sizeof(int64_t);
595 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
597 if (!m_opaque_sp.get())
598 m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
599 GetAddressByteSize());
600 else
601 m_opaque_sp->SetData(buffer_sp);
603 return true;
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);
611 if (!array || array_len == 0) {
612 return false;
615 size_t data_len = array_len * sizeof(int32_t);
617 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
619 if (!m_opaque_sp.get())
620 m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
621 GetAddressByteSize());
622 else
623 m_opaque_sp->SetData(buffer_sp);
625 return true;
628 bool SBData::SetDataFromDoubleArray(double *array, size_t array_len) {
629 LLDB_RECORD_METHOD(bool, SBData, SetDataFromDoubleArray, (double *, size_t),
630 array, array_len);
633 if (!array || array_len == 0) {
634 return false;
637 size_t data_len = array_len * sizeof(double);
639 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
641 if (!m_opaque_sp.get())
642 m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
643 GetAddressByteSize());
644 else
645 m_opaque_sp->SetData(buffer_sp);
647 return true;
650 namespace lldb_private {
651 namespace repro {
653 template <>
654 void RegisterMethods<SBData>(Registry &R) {
655 LLDB_REGISTER_CONSTRUCTOR(SBData, ());
656 LLDB_REGISTER_CONSTRUCTOR(SBData, (const lldb::SBData &));
657 LLDB_REGISTER_METHOD(const lldb::SBData &,
658 SBData, operator=,(const lldb::SBData &));
659 LLDB_REGISTER_METHOD(bool, SBData, IsValid, ());
660 LLDB_REGISTER_METHOD_CONST(bool, SBData, operator bool, ());
661 LLDB_REGISTER_METHOD(uint8_t, SBData, GetAddressByteSize, ());
662 LLDB_REGISTER_METHOD(void, SBData, SetAddressByteSize, (uint8_t));
663 LLDB_REGISTER_METHOD(void, SBData, Clear, ());
664 LLDB_REGISTER_METHOD(size_t, SBData, GetByteSize, ());
665 LLDB_REGISTER_METHOD(lldb::ByteOrder, SBData, GetByteOrder, ());
666 LLDB_REGISTER_METHOD(void, SBData, SetByteOrder, (lldb::ByteOrder));
667 LLDB_REGISTER_METHOD(float, SBData, GetFloat,
668 (lldb::SBError &, lldb::offset_t));
669 LLDB_REGISTER_METHOD(double, SBData, GetDouble,
670 (lldb::SBError &, lldb::offset_t));
671 LLDB_REGISTER_METHOD(long double, SBData, GetLongDouble,
672 (lldb::SBError &, lldb::offset_t));
673 LLDB_REGISTER_METHOD(lldb::addr_t, SBData, GetAddress,
674 (lldb::SBError &, lldb::offset_t));
675 LLDB_REGISTER_METHOD(uint8_t, SBData, GetUnsignedInt8,
676 (lldb::SBError &, lldb::offset_t));
677 LLDB_REGISTER_METHOD(uint16_t, SBData, GetUnsignedInt16,
678 (lldb::SBError &, lldb::offset_t));
679 LLDB_REGISTER_METHOD(uint32_t, SBData, GetUnsignedInt32,
680 (lldb::SBError &, lldb::offset_t));
681 LLDB_REGISTER_METHOD(uint64_t, SBData, GetUnsignedInt64,
682 (lldb::SBError &, lldb::offset_t));
683 LLDB_REGISTER_METHOD(int8_t, SBData, GetSignedInt8,
684 (lldb::SBError &, lldb::offset_t));
685 LLDB_REGISTER_METHOD(int16_t, SBData, GetSignedInt16,
686 (lldb::SBError &, lldb::offset_t));
687 LLDB_REGISTER_METHOD(int32_t, SBData, GetSignedInt32,
688 (lldb::SBError &, lldb::offset_t));
689 LLDB_REGISTER_METHOD(int64_t, SBData, GetSignedInt64,
690 (lldb::SBError &, lldb::offset_t));
691 LLDB_REGISTER_METHOD(const char *, SBData, GetString,
692 (lldb::SBError &, lldb::offset_t));
693 LLDB_REGISTER_METHOD(bool, SBData, GetDescription,
694 (lldb::SBStream &, lldb::addr_t));
695 LLDB_REGISTER_METHOD(bool, SBData, Append, (const lldb::SBData &));
696 LLDB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromCString,
697 (lldb::ByteOrder, uint32_t, const char *));
698 LLDB_REGISTER_STATIC_METHOD(
699 lldb::SBData, SBData, CreateDataFromUInt64Array,
700 (lldb::ByteOrder, uint32_t, uint64_t *, size_t));
701 LLDB_REGISTER_STATIC_METHOD(
702 lldb::SBData, SBData, CreateDataFromUInt32Array,
703 (lldb::ByteOrder, uint32_t, uint32_t *, size_t));
704 LLDB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromSInt64Array,
705 (lldb::ByteOrder, uint32_t, int64_t *, size_t));
706 LLDB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromSInt32Array,
707 (lldb::ByteOrder, uint32_t, int32_t *, size_t));
708 LLDB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromDoubleArray,
709 (lldb::ByteOrder, uint32_t, double *, size_t));
710 LLDB_REGISTER_METHOD(bool, SBData, SetDataFromCString, (const char *));
711 LLDB_REGISTER_METHOD(bool, SBData, SetDataFromUInt64Array,
712 (uint64_t *, size_t));
713 LLDB_REGISTER_METHOD(bool, SBData, SetDataFromUInt32Array,
714 (uint32_t *, size_t));
715 LLDB_REGISTER_METHOD(bool, SBData, SetDataFromSInt64Array,
716 (int64_t *, size_t));
717 LLDB_REGISTER_METHOD(bool, SBData, SetDataFromSInt32Array,
718 (int32_t *, size_t));
719 LLDB_REGISTER_METHOD(bool, SBData, SetDataFromDoubleArray,
720 (double *, size_t));