157 lines · plain
1## This test checks that debug info contained in the source file is properly2## verified by --verify after copying. If --no-garbage-collection is3## specified then the verification should fail, otherwise the verification4## should succeed.5 6# RUN: yaml2obj %s -o %t.o7 8## Verify resulting debug info after --garbage-collection optimisation.9# RUN: llvm-dwarfutil %t.o %t1 --verify10# RUN: llvm-dwarfutil --linker parallel %t.o %t1 --verify11 12## Verify separate debug file after --garbage-collection optimisation.13# RUN: llvm-dwarfutil %t.o --separate-debug-file %t1 --verify14# RUN: llvm-dwarfutil --linker parallel %t.o --separate-debug-file %t1 --verify15 16## Verify not optimised resulting debug info.17# RUN: not llvm-dwarfutil --no-garbage-collection %t.o %t1 --verify 2>&1 | FileCheck %s -DFILE=%t118# RUN: not llvm-dwarfutil --linker parallel --no-garbage-collection %t.o %t1 --verify 2>&1 | FileCheck %s -DFILE=%t119 20## Verify not optimised resulting separate debug file.21# RUN: not llvm-dwarfutil --no-garbage-collection %t.o --separate-debug-file %t1 --verify 2>&1 | FileCheck %s -DFILE=%t1.debug22# RUN: not llvm-dwarfutil --linker parallel --no-garbage-collection %t.o --separate-debug-file %t1 --verify 2>&1 | FileCheck %s -DFILE=%t1.debug23 24## Check that verification is disabled when destination is stdout.25# RUN: llvm-dwarfutil %t.o - --verify 2>&1 | FileCheck %s --check-prefix=CHECK-STDOUT26# RUN: llvm-dwarfutil --linker parallel %t.o - --verify 2>&1 | FileCheck %s --check-prefix=CHECK-STDOUT27 28# CHECK: error: '[[FILE]]': output verification failed29# CHECK-STDOUT: warning: verification skipped because writing to stdout30 31--- !ELF32FileHeader:33 Class: ELFCLASS6434 Data: ELFDATA2LSB35 Type: ET_REL36 Machine: EM_X86_6437DWARF:38 debug_abbrev:39 - Table:40 - Tag: DW_TAG_compile_unit41 Children: DW_CHILDREN_yes42 Attributes:43 - Attribute: DW_AT_producer44 Form: DW_FORM_string45 - Attribute: DW_AT_language46 Form: DW_FORM_data247 - Attribute: DW_AT_name48 Form: DW_FORM_string49 - Attribute: DW_AT_low_pc50 Form: DW_FORM_addr51 - Attribute: DW_AT_high_pc52 Form: DW_FORM_data853 - Tag: DW_TAG_subprogram54 Children: DW_CHILDREN_no55 Attributes:56 - Attribute: DW_AT_name57 Form: DW_FORM_string58 - Attribute: DW_AT_low_pc59 Form: DW_FORM_addr60 - Attribute: DW_AT_high_pc61 Form: DW_FORM_data862 - Attribute: DW_AT_type63 Form: DW_FORM_ref464 - Tag: DW_TAG_class_type65 Children: DW_CHILDREN_yes66 Attributes:67 - Attribute: DW_AT_name68 Form: DW_FORM_string69 - Tag: DW_TAG_member70 Children: DW_CHILDREN_no71 Attributes:72 - Attribute: DW_AT_type73 Form: DW_FORM_ref474 - Attribute: DW_AT_name75 Form: DW_FORM_string76 - Tag: DW_TAG_class_type77 Children: DW_CHILDREN_no78 Attributes:79 - Attribute: DW_AT_name80 Form: DW_FORM_string81 - Attribute: DW_AT_declaration82 Form: DW_FORM_flag_present83 - Tag: DW_TAG_class_type84 Children: DW_CHILDREN_yes85 Attributes:86 - Attribute: DW_AT_name87 Form: DW_FORM_string88 - Attribute: DW_AT_declaration89 Form: DW_FORM_flag_present90 - Tag: DW_TAG_template_type_parameter91 Children: DW_CHILDREN_no92 Attributes:93 - Attribute: DW_AT_type94 Form: DW_FORM_ref495 - Tag: DW_TAG_base_type96 Children: DW_CHILDREN_no97 Attributes:98 - Attribute: DW_AT_name99 Form: DW_FORM_string100 debug_info:101 - Version: 4102 Entries:103 - AbbrCode: 1104 Values:105 - CStr: by_hand106 - Value: 0x04107 - CStr: CU1108 - Value: 0x1000109 - Value: 0x100110 - AbbrCode: 3111 Values:112 - CStr: class1113 - AbbrCode: 4114 Values:115 - Value: 0x0000006c116 - CStr: member1117 - AbbrCode: 0118 - AbbrCode: 3119 Values:120 - CStr: class2121 - AbbrCode: 4122 Values:123 - Value: 0x0000006c124 - CStr: member1125 - AbbrCode: 0126 - AbbrCode: 3127 Values:128 - CStr: class3129 - AbbrCode: 4130 Values:131 - Value: 0x0000006c132 - CStr: member1133 - AbbrCode: 0134 - AbbrCode: 8135 Values:136 - CStr: int137 - AbbrCode: 2138 Values:139 - CStr: foo1140 - Value: 0x1000141 - Value: 0x10142 - Value: 0x0000002a143 - AbbrCode: 2144 Values:145 - CStr: foo2146 - Value: 0x0147 - Value: 0x100148 - Value: 0x00000040149 - AbbrCode: 2150 Values:151 - CStr: foo3152 - Value: 0x0153 - Value: 0x80154 - Value: 0x00000040155 - AbbrCode: 0156...157