brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.9 KiB · 8ffb57b Raw
220 lines · plain
1## This test checks DWARFv5 DW_MACRO_start_file,2## DW_MACRO_end_file, DW_MACRO_define, DW_MACRO_undef,3## DW_MACRO_define_strp, DW_MACRO_undef_strp,4## DW_MACRO_define_strx, DW_MACRO_undef_strx attributes.5 6# RUN: yaml2obj %s -o %t.o7# RUN: llvm-dwarfutil %t.o %t1 2>&1 | FileCheck --check-prefix=WARN %s8# RUN: llvm-dwarfdump --verify %t1 | FileCheck --check-prefix=VERIFY %s9# RUN: llvm-dwarfdump -a %t1 | FileCheck %s10 11# RUN: llvm-dwarfutil --linker parallel %t.o %t1 2>&1 | FileCheck --check-prefix=WARN %s12# RUN: llvm-dwarfdump --verify %t1 | FileCheck --check-prefix=VERIFY %s13# RUN: llvm-dwarfdump -a %t1 | FileCheck %s14 15# WARN: warning: DW_MACRO_define_strx unsupported yet. Convert to DW_MACRO_define_strp.16# WARN: warning: DW_MACRO_undef_strx unsupported yet. Convert to DW_MACRO_undef_strp.17# WARN: warning: DW_MACRO_import and DW_MACRO_import_sup are unsupported yet. remove.18 19# VERIFY: No errors.20 21##  Content:        "05000003000201004400020144000503000000000604000000000b03000c040007000000000400":22#23##  .short  5    # Macro information version24##  .byte   0    # Flags: 32 bit25##  .byte   3    # DW_MACRO_start_file26##  .byte   0    # Line Number27##  .byte   2    # File Number28##  .byte   1    # DW_MACRO_define29##  .byte   0    # Line Number30##  .asciz  "D"  # Macro String31##  .byte   2    # DW_MACRO_undef32##  .byte   1    # Line Number33##  .asciz  "D"  # Macro String34##  .byte   5    # DW_MACRO_define_strp35##  .byte   3    # Line Number36##  .int  00000000  # Macro String37##  .byte   6    # DW_MACRO_undef_strp38##  .byte   4    # Line Number39##  .int  00000000  # Macro String40##  .byte   11   # DW_MACRO_define_strx41##  .byte   3    # Line Number42##  .byte   00   # Macro String43##  .byte   12   # DW_MACRO_undef_strx44##  .byte   4    # Line Number45##  .byte   00   # Macro String46##  .byte   7    # DW_MACRO_import47##  .int    0    # Offset48##  .byte   4    # DW_MACRO_end_file49##  .byte   0    # End Of Macro List Mark50 51#CHECK: .debug_info contents:52#CHECK:  DW_TAG_compile_unit53#CHECK:    DW_AT_name        ("CU1")54#CHECK:    DW_AT_macros  (0x00000000)55#CHECK: .debug_macro contents:56#CHECK: 0x00000000:57#CHECK: DW_MACRO_start_file - lineno: 0 filenum: 258#CHECK-NEXT: DW_MACRO_define - lineno: 0 macro: D59#CHECK-NEXT: DW_MACRO_undef - lineno: 1 macro: D60#CHECK-NEXT:   DW_MACRO_define_strp - lineno: 3 macro: aa61#CHECK-NEXT:   DW_MACRO_undef_strp - lineno: 4 macro: aa62#CHECK-NEXT:   DW_MACRO_define_strp - lineno: 3 macro: aa63#CHECK-NEXT:   DW_MACRO_undef_strp - lineno: 4 macro: aa64#CHECK-NEXT: DW_MACRO_end_file65 66--- !ELF67FileHeader:68  Class:    ELFCLASS6469  Data:     ELFDATA2LSB70  Type:     ET_REL71  Machine:  EM_X86_6472Sections:73  - Name:            .text74    Type:            SHT_PROGBITS75    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]76    Address:         0x100077    Size:            0x1b78  - Name:            .debug_macro79    Type:            SHT_PROGBITS80    Flags:           [  ]81    Content:        "05000003000201004400020144000503000000000604000000000b03000c040007000000000400"82  - Name:            .debug_str_offsets83    Type:            SHT_PROGBITS84    Flags:           [  ]85    Content:        "080000000500000000000000"86DWARF:87  debug_abbrev:88    - Table:89      - Tag:      DW_TAG_compile_unit90        Children: DW_CHILDREN_yes91        Attributes:92          - Attribute: DW_AT_producer93            Form:      DW_FORM_string94          - Attribute: DW_AT_language95            Form:      DW_FORM_data296          - Attribute: DW_AT_name97            Form:      DW_FORM_string98          - Attribute: DW_AT_low_pc99            Form:      DW_FORM_addr100          - Attribute: DW_AT_high_pc101            Form:      DW_FORM_data8102          - Attribute: DW_AT_macros103            Form:      DW_FORM_sec_offset104          - Attribute: DW_AT_str_offsets_base105            Form:      DW_FORM_sec_offset106      - Tag:      DW_TAG_class_type107        Children: DW_CHILDREN_yes108        Attributes:109          - Attribute: DW_AT_name110            Form:      DW_FORM_string111      - Tag:      DW_TAG_member112        Children: DW_CHILDREN_no113        Attributes:114          - Attribute: DW_AT_type115            Form:      DW_FORM_ref4116          - Attribute: DW_AT_name117            Form:      DW_FORM_string118      - Tag:      DW_TAG_class_type119        Children: DW_CHILDREN_no120        Attributes:121          - Attribute: DW_AT_name122            Form:      DW_FORM_string123          - Attribute: DW_AT_declaration124            Form:      DW_FORM_flag_present125      - Tag:      DW_TAG_class_type126        Children: DW_CHILDREN_yes127        Attributes:128          - Attribute: DW_AT_name129            Form:      DW_FORM_string130          - Attribute: DW_AT_declaration131            Form:      DW_FORM_flag_present132      - Tag:      DW_TAG_template_type_parameter133        Children: DW_CHILDREN_no134        Attributes:135          - Attribute: DW_AT_type136            Form:      DW_FORM_ref4137      - Tag:      DW_TAG_base_type138        Children: DW_CHILDREN_no139        Attributes:140          - Attribute: DW_AT_name141            Form:      DW_FORM_string142      - Tag:      DW_TAG_pointer_type143        Children: DW_CHILDREN_no144        Attributes:145          - Attribute: DW_AT_type146            Form:      DW_FORM_ref4147      - Tag:      DW_TAG_variable148        Children: DW_CHILDREN_no149        Attributes:150          - Attribute: DW_AT_name151            Form:      DW_FORM_string152          - Attribute: DW_AT_const_value153            Form:      DW_FORM_data4154          - Attribute: DW_AT_type155            Form:      DW_FORM_ref4156      - Tag:      DW_TAG_subprogram157        Children: DW_CHILDREN_no158        Attributes:159          - Attribute: DW_AT_name160            Form:      DW_FORM_string161          - Attribute: DW_AT_low_pc162            Form:      DW_FORM_addr163          - Attribute: DW_AT_high_pc164            Form:      DW_FORM_data8165          - Attribute: DW_AT_type166            Form:      DW_FORM_ref4167  debug_info:168    - Version: 5169      UnitType:   DW_UT_compile170      Entries:171        - AbbrCode: 1172          Values:173            - CStr: by_hand174            - Value:  0x04175            - CStr: CU1176            - Value:  0x1000177            - Value:  0x1b178            - Value:  0x0179            - Value:  0x8180        - AbbrCode: 2181          Values:182            - CStr: class1183        - AbbrCode: 3184          Values:185            - Value:  0x00000056186            - CStr: member1187        - AbbrCode: 3188          Values:189            - Value:  0x0000005c190            - CStr: member2191        - AbbrCode: 0192        - AbbrCode: 7193          Values:194            - CStr: int195        - AbbrCode: 7196          Values:197            - CStr: char198        - AbbrCode: 7199          Values:200            - CStr: float201        - AbbrCode: 8202          Values:203            - Value:  0x00000033204        - AbbrCode: 9205          Values:206            - CStr: var1207            - Value:  0x00000000208            - Value:  0x00000056209        - AbbrCode: 10210          Values:211            - CStr: foo1212            - Value:  0x1000213            - Value:  0x10214            - Value:  0x00000033215        - AbbrCode: 0216        - AbbrCode: 0217  debug_str:218    - 'aa'219...220