brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · f5c4a4a Raw
54 lines · plain
1# Check that the llvm-bolt update the dwarf information correctly in case:2#  - DW_AT_low_pc is nullified in case the DW_AT_ranges tag already exists.3#  - DW_AT_high_pc is in the form of DW_FORM_addr.4 5RUN: yaml2obj %p/Inputs/go_dwarf.yaml &> %t.exe6RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections7 8# Check the original binary values.9RUN: llvm-dwarfdump -debug-info %t.exe 2>&1 | \10RUN:   FileCheck %s -check-prefix=CHECKORIG11 12CHECKORIG:         DW_TAG_compile_unit13CHECKORIG-NEXT:        DW_AT_producer14CHECKORIG-NEXT:        DW_AT_language15CHECKORIG-NEXT:        DW_AT_name16CHECKORIG-NEXT:        DW_AT_comp_dir17CHECKORIG-NEXT:        DW_AT_ranges      (0x0000000018CHECKORIG-NEXT:           [0x0000000000000660, 0x0000000000000684))19CHECKORIG-NEXT:        DW_AT_low_pc      (0x0000000000000660)20 21CHECKORIG:         DW_TAG_subprogram22CHECKORIG-NEXT:        DW_AT_external  (true)23CHECKORIG-NEXT:        DW_AT_name      ("main")24CHECKORIG-NEXT:        DW_AT_decl_file25CHECKORIG-NEXT:        DW_AT_decl_line (1)26CHECKORIG-NEXT:        DW_AT_decl_column       (5)27CHECKORIG-NEXT:        DW_AT_type28CHECKORIG-NEXT:        DW_AT_low_pc    (0x0000000000000660)29CHECKORIG-NEXT:        DW_AT_high_pc   (0x0000000000000684)30 31 32# Check the bolted binary.33RUN: llvm-dwarfdump -debug-info %t.bolt 2>&1 | FileCheck %s34 35CHECK:         DW_TAG_compile_unit36CHECK-NEXT:        DW_AT_producer37CHECK-NEXT:        DW_AT_language38CHECK-NEXT:        DW_AT_name39CHECK-NEXT:        DW_AT_comp_dir40CHECK-NEXT:        DW_AT_ranges      (0x0000001041CHECK-NEXT:           [0x0000000000000660, 0x0000000000000684))42CHECK-NEXT:        DW_AT_low_pc      (0x0000000000000000)43CHECK-NEXT:        DW_AT_stmt_list   (0x00000000)44 45CHECK:         DW_TAG_subprogram46CHECK-NEXT:        DW_AT_external  (true)47CHECK-NEXT:        DW_AT_name      ("main")48CHECK-NEXT:        DW_AT_decl_file49CHECK-NEXT:        DW_AT_decl_line (1)50CHECK-NEXT:        DW_AT_decl_column       (5)51CHECK-NEXT:        DW_AT_type52CHECK-NEXT:        DW_AT_low_pc    (0x0000000000000660)53CHECK-NEXT:        DW_AT_high_pc (0x0000000000000024)54