# This is malformed DWARF where we placed a non-zero sized type # at an offset that is larger the parent DW_AT_byte_size. Check # that we report an error in such cases. # # DW_TAG_compile_unit # DW_AT_name ("main.cpp") # DW_AT_language (DW_LANG_C) # # DW_TAG_base_type # DW_AT_name ("int") # DW_AT_encoding (DW_ATE_signed) # DW_AT_byte_size (0x04) # # DW_TAG_structure_type # DW_AT_name ("Foo") # DW_AT_byte_size (0x04) # # DW_TAG_member # DW_AT_name ("mem") # DW_AT_data_member_location ("0x05") # DW_AT_type (0x00000011 "int") # # NULL # # NULL # RUN: yaml2obj %s > %t # RUN: lldb-test symbols --name=Foo --find=type %t 2>&1 | FileCheck %s # CHECK: Found 1 types: --- !ELF FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_EXEC Machine: EM_X86_64 DWARF: debug_str: - main.cpp - int - Foo - mem debug_abbrev: - ID: 0 Table: - Code: 0x1 Tag: DW_TAG_compile_unit Children: DW_CHILDREN_yes Attributes: - Attribute: DW_AT_name Form: DW_FORM_strp - Attribute: DW_AT_language Form: DW_FORM_udata - Code: 0x2 Tag: DW_TAG_base_type Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_name Form: DW_FORM_strp - Attribute: DW_AT_encoding Form: DW_FORM_data1 - Attribute: DW_AT_byte_size Form: DW_FORM_data1 - Code: 0x3 Tag: DW_TAG_structure_type Children: DW_CHILDREN_yes Attributes: - Attribute: DW_AT_name Form: DW_FORM_strp - Attribute: DW_AT_byte_size Form: DW_FORM_data1 - Code: 0x4 Tag: DW_TAG_member Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_name Form: DW_FORM_strp - Attribute: DW_AT_type Form: DW_FORM_ref4 - Attribute: DW_AT_data_member_location Form: DW_FORM_data1 debug_info: - Version: 4 AbbrevTableID: 0 AbbrOffset: 0x0 AddrSize: 8 Entries: - AbbrCode: 0x1 Values: - Value: 0x0 - Value: 0x2 - AbbrCode: 0x2 Values: - Value: 0x9 - Value: 0x5 - Value: 0x4 - AbbrCode: 0x3 Values: - Value: 0x0d - Value: 0x04 - AbbrCode: 0x4 Values: - Value: 0x11 - Value: 0x11 - Value: 0x05 - AbbrCode: 0x0 - AbbrCode: 0x0 ...