110 lines · yaml
1# This is malformed DWARF where we placed a non-zero sized type2# at an offset that is larger the parent DW_AT_byte_size. Check3# that we report an error in such cases.4#5# DW_TAG_compile_unit6# DW_AT_name ("main.cpp")7# DW_AT_language (DW_LANG_C)8#9# DW_TAG_base_type10# DW_AT_name ("int")11# DW_AT_encoding (DW_ATE_signed)12# DW_AT_byte_size (0x04)13#14# DW_TAG_structure_type15# DW_AT_name ("Foo")16# DW_AT_byte_size (0x04)17#18# DW_TAG_member19# DW_AT_name ("mem")20# DW_AT_data_member_location ("0x05")21# DW_AT_type (0x00000011 "int")22#23# NULL24#25# NULL26 27# RUN: yaml2obj %s > %t28# RUN: lldb-test symbols --name=Foo --find=type %t 2>&1 | FileCheck %s29 30# CHECK: Found 1 types:31 32--- !ELF33FileHeader:34 Class: ELFCLASS6435 Data: ELFDATA2LSB36 Type: ET_EXEC37 Machine: EM_X86_6438DWARF:39 debug_str:40 - main.cpp41 - int42 - Foo43 - mem44 debug_abbrev:45 - ID: 046 Table:47 - Code: 0x148 Tag: DW_TAG_compile_unit49 Children: DW_CHILDREN_yes50 Attributes:51 - Attribute: DW_AT_name52 Form: DW_FORM_strp53 - Attribute: DW_AT_language54 Form: DW_FORM_udata55 - Code: 0x256 Tag: DW_TAG_base_type57 Children: DW_CHILDREN_no58 Attributes:59 - Attribute: DW_AT_name60 Form: DW_FORM_strp61 - Attribute: DW_AT_encoding62 Form: DW_FORM_data163 - Attribute: DW_AT_byte_size64 Form: DW_FORM_data165 - Code: 0x366 Tag: DW_TAG_structure_type67 Children: DW_CHILDREN_yes68 Attributes:69 - Attribute: DW_AT_name70 Form: DW_FORM_strp71 - Attribute: DW_AT_byte_size72 Form: DW_FORM_data173 - Code: 0x474 Tag: DW_TAG_member75 Children: DW_CHILDREN_no76 Attributes:77 - Attribute: DW_AT_name78 Form: DW_FORM_strp79 - Attribute: DW_AT_type80 Form: DW_FORM_ref481 - Attribute: DW_AT_data_member_location82 Form: DW_FORM_data183 debug_info:84 - Version: 485 AbbrevTableID: 086 AbbrOffset: 0x087 AddrSize: 888 Entries:89 - AbbrCode: 0x190 Values:91 - Value: 0x092 - Value: 0x293 - AbbrCode: 0x294 Values:95 - Value: 0x996 - Value: 0x597 - Value: 0x498 - AbbrCode: 0x399 Values:100 - Value: 0x0d101 - Value: 0x04102 - AbbrCode: 0x4103 Values:104 - Value: 0x11105 - Value: 0x11106 - Value: 0x05107 - AbbrCode: 0x0108 - AbbrCode: 0x0109...110