123 if (
m_form == DW_FORM_implicit_const)
126 bool indirect =
false;
127 bool is_block =
false;
129 uint8_t ref_addr_size;
156 case DW_FORM_exprloc:
168 case DW_FORM_line_strp:
169 case DW_FORM_sec_offset:
197 case DW_FORM_ref_sig8:
201 case DW_FORM_rnglistx:
204 case DW_FORM_ref_udata:
205 case DW_FORM_GNU_str_index:
206 case DW_FORM_GNU_addr_index:
209 case DW_FORM_ref_addr:
217 case DW_FORM_indirect:
221 case DW_FORM_flag_present:
248 uint8_t ref_addr_size;
252 case DW_FORM_exprloc:
253 case DW_FORM_block: {
258 case DW_FORM_block1: {
263 case DW_FORM_block2: {
268 case DW_FORM_block4: {
276 debug_info_data.
GetCStr(offset_ptr);
284 case DW_FORM_ref_addr:
292 *offset_ptr += ref_addr_size;
296 case DW_FORM_flag_present:
297 case DW_FORM_implicit_const:
324 case DW_FORM_sec_offset:
340 case DW_FORM_ref_sig8:
346 case DW_FORM_rnglistx:
349 case DW_FORM_ref_udata:
350 case DW_FORM_GNU_addr_index:
351 case DW_FORM_GNU_str_index:
356 case DW_FORM_indirect: {
370 bool cu_relative_offset =
false;
374 s.
Address(uvalue,
sizeof(uint64_t));
383 case DW_FORM_sec_offset:
387 case DW_FORM_ref_sig8:
394 case DW_FORM_exprloc:
401 case DW_FORM_exprloc:
403 s.
Printf(
"<0x%" PRIx64
"> ", uvalue);
406 s.
Printf(
"<0x%2.2x> ", (uint8_t)uvalue);
420 const uint8_t *end_data_ptr =
422 while (data_ptr < end_data_ptr) {
423 s.
Printf(
"%2.2x ", *data_ptr);
446 case DW_FORM_ref_addr: {
450 s.
Address(uvalue,
sizeof(uint64_t) * 2);
457 cu_relative_offset =
true;
460 cu_relative_offset =
true;
463 cu_relative_offset =
true;
466 cu_relative_offset =
true;
468 case DW_FORM_ref_udata:
469 cu_relative_offset =
true;
474 case DW_FORM_indirect:
477 case DW_FORM_flag_present:
484 if (cu_relative_offset) {
494 if (
m_form == DW_FORM_string) {
496 }
else if (
m_form == DW_FORM_strp) {
501 }
else if (
m_form == DW_FORM_GNU_str_index) {
513 if (
m_form == DW_FORM_strx ||
m_form == DW_FORM_strx1 ||
515 m_form == DW_FORM_strx4) {
529 if (
m_form == DW_FORM_line_strp)
538 if (
m_form == DW_FORM_addr)
542 assert(
m_form == DW_FORM_GNU_addr_index ||
m_form == DW_FORM_addrx ||
562 case DW_FORM_ref_udata:
567 case DW_FORM_ref_addr:
568 case DW_FORM_ref_sig8:
569 case DW_FORM_GNU_ref_alt:
584 case DW_FORM_ref_udata:
585 return value + base_offset;
587 case DW_FORM_ref_addr:
588 case DW_FORM_ref_sig8:
589 case DW_FORM_GNU_ref_alt:
601 case DW_FORM_exprloc:
641 case DW_FORM_ref_addr:
642 case DW_FORM_sec_offset:
643 case DW_FORM_flag_present:
644 case DW_FORM_ref_sig8:
645 case DW_FORM_GNU_addr_index: {
655 case DW_FORM_sdata: {
656 int64_t a = a_value.
Signed();
657 int64_t b = b_value.
Signed();
667 case DW_FORM_GNU_str_index: {
668 const char *a_string = a_value.
AsCString();
669 const char *b_string = b_value.
AsCString();
670 if (a_string == b_string)
672 else if (a_string && b_string)
673 return strcmp(a_string, b_string);
674 else if (a_string == NULL)
684 case DW_FORM_exprloc: {
685 uint64_t a_len = a_value.
Unsigned();
686 uint64_t b_len = b_value.
Unsigned();
699 case DW_FORM_ref_udata: {
709 case DW_FORM_indirect:
711 "This shouldn't happen after the form has been extracted...");
714 llvm_unreachable(
"Unhandled DW_FORM");
723 case DW_FORM_rnglistx:
742 case DW_FORM_ref_addr:
747 case DW_FORM_ref_udata:
748 case DW_FORM_indirect:
749 case DW_FORM_sec_offset:
750 case DW_FORM_exprloc:
751 case DW_FORM_flag_present:
752 case DW_FORM_ref_sig8:
753 case DW_FORM_GNU_str_index:
754 case DW_FORM_GNU_addr_index:
755 case DW_FORM_implicit_const:
virtual const lldb_private::DWARFDataExtractor & get_debug_addr_data()
void Address(uint64_t addr, uint32_t addr_size, const char *prefix=nullptr, const char *suffix=nullptr)
Output an address value to this stream.
virtual const lldb_private::DWARFDataExtractor & get_debug_str_offsets_data()
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Enumerations for broadcasting.
A stream class that can stream formatted output to a file.
size_t PutHex16(uint16_t uvalue, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
uint16_t GetVersion() const
dw_addr_t GetAddrBase() const
dw_addr_t GetStrOffsetsBase() const
size_t PutHex32(uint32_t uvalue, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t PutHex64(uint64_t uvalue, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
uint8_t GetAddressByteSize() const
dw_offset_t GetOffset() const
void QuotedCString(const char *cstr, const char *format="\s\)
Output a quoted C string value to the stream.
size_t size_t PutHex8(uint8_t uvalue)
Append an uint8_t value in the hexadecimal format to the stream.
const lldb_private::DWARFDataExtractor & get_debug_line_str_data()
SymbolFileDWARF * GetSymbolFileDWARF() const
#define DW_INVALID_OFFSET
size_t PutSLEB128(int64_t uval)
Output a SLEB128 number to the stream.
size_t PutULEB128(uint64_t uval)
Output a ULEB128 number to the stream.
virtual const lldb_private::DWARFDataExtractor & get_debug_str_data()