brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · de6a609 Raw
56 lines · plain
1# REQUIRES: system-linux2 3# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-loclist-offset-form-main.s -o %tmain.o4# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-loclist-offset-form-helper.s -o %thelper.o5# RUN: %clang %cflags -dwarf-5 %tmain.o %thelper.o -o %t.exe -Wl,-q6# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=4 --cu-processing-batch-size=47# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s8# RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt > %t.txt9# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t.txt10# RUN: cat %t.txt | FileCheck --check-prefix=POSTCHECK %s11 12## Checks we can handle DWARF5 CU with DWARF4 DW_AT_location access pattern.13 14# PRECHECK: DW_TAG_compile_unit15# PRECHECK: DW_TAG_variable [5]16# PRECHECK-NEXT: DW_AT_location [DW_FORM_sec_offset]17# PRECHECK: DW_TAG_variable [5]18# PRECHECK-NEXT: DW_AT_location [DW_FORM_sec_offset]19# PRECHECK: DW_TAG_compile_unit20# PRECHECK: DW_TAG_variable [11]21# PRECHECK-NEXT: DW_AT_location [DW_FORM_sec_offset]22 23# POSTCHECK: Addrs: [24# POSTCHECK-NEXT: 0x[[#%.16x,ADDR:]]25# POSTCHECK-NEXT: 0x[[#%.16x,ADDR1:]]26# POSTCHECK-NEXT: 0x[[#%.16x,ADDR2:]]27# POSTCHECK-NEXT: 0x[[#%.16x,ADDR3:]]28# For second CU.29# POSTCHECK: Addrs: [30# POSTCHECK-NEXT: 0x[[#%.16x,ADDR4:]]31# POSTCHECK-NEXT: 0x[[#%.16x,ADDR5:]]32# POSTCHECK-NEXT: 0x[[#%.16x,ADDR6:]]33# POSTCHECK-NEXT: 0x[[#%.16x,ADDR7:]]34 35# POSTCHECK: DW_TAG_compile_unit36# POSTCHECK: DW_AT_loclists_base [DW_FORM_sec_offset]  (0x0000000c)37# POSTCHECK: DW_TAG_variable [5]38# POSTCHECK-NEXT: DW_AT_location [DW_FORM_loclistx] (indexed (0x0)39# POSTCHECK-NEXT: [0x[[#ADDR2]]40# POSTCHECK-SAME: 0x[[#ADDR2 + 0x9]]41# POSTCHECK-NEXT: [0x[[#ADDR2 + 0x9]]42# POSTCHECK-SAME: 0x[[#ADDR2 + 0xf]]43# POSTCHECK: DW_TAG_variable [5]44# POSTCHECK-NEXT: DW_AT_location [DW_FORM_loclistx] (indexed (0x1)45# POSTCHECK-NEXT: [0x[[#ADDR3]]46# POSTCHECK-SAME: 0x[[#ADDR3 + 2]]47 48# POSTCHECK: DW_TAG_compile_unit49# POSTCHECK: DW_AT_loclists_base [DW_FORM_sec_offset]  (0x00000045)50# POSTCHECK: DW_TAG_variable [5]51# POSTCHECK-NEXT: DW_AT_location [DW_FORM_loclistx] (indexed (0x0)52# POSTCHECK-NEXT: [0x[[#ADDR7]]53# POSTCHECK-SAME: 0x[[#ADDR7 + 0x3]]54# POSTCHECK-NEXT: [0x[[#ADDR7 + 0x3]]55# POSTCHECK-SAME: 0x[[#ADDR7 + 0x4]]56