[llvm-gsymutil] Disable test macho-gsym-merged-callsites-dsym (#119957)
[llvm-project.git] / bolt / test / X86 / dwarf5-one-loclists-two-bases.test
blob9e6fdb94b916a8dd222f245d8d80dacb1f737526
1 # REQUIRES: system-linux
3 # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5_main.s -o %tmain.o
4 # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-loc-base-no-loc-accesshelper.s -o %thelper.o
5 # RUN: %clang %cflags -dwarf-5 %tmain.o %thelper.o -o %t.exe -Wl,-q
6 # RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=4 --cu-processing-batch-size=4
7 # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s
8 # RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt > %t.txt
9 # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t.txt
10 # RUN: cat %t.txt | FileCheck --check-prefix=POSTCHECK %s
12 ## This tests checks that re-writing of .debug_loclists is handled correctly when one of the CUs
13 ## doesn't have any DW_AT_location accesses.
15 # PRECHECK: version = 0x0005
16 # PRECHECK: DW_AT_loclists_base [DW_FORM_sec_offset] (0x0000000c)
17 # PRECHECK-EMPTY:
18 # PRECHECK: DW_TAG_variable
19 # PRECHECK: DW_AT_location [DW_FORM_loclistx]
20 # PRECHECK-SAME: indexed (0x0)
21 # PRECHECK-SAME: loclist = 0x00000014
22 # PRECHECK: DW_AT_location [DW_FORM_loclistx]
23 # PRECHECK-SAME: indexed (0x1)
24 # PRECHECK-SAME: loclist = 0x00000028
25 # PRECHECK: DW_AT_loclists_base [DW_FORM_sec_offset]  (0x00000043)
26 # PRECHECK-NOT: DW_AT_location
28 # POSTCHECK: Addrs: [
29 # POSTCHECK-NEXT: 0x
30 # POSTCHECK-NEXT: 0x
31 # POSTCHECK-NEXT: 0x[[#%.16x,ADDR:]]
32 # POSTCHECK-NEXT: 0x[[#%.16x,ADDR2:]]
34 # POSTCHECK: version = 0x0005
35 # POSTCHECK: DW_AT_loclists_base [DW_FORM_sec_offset]   (0x0000000c)
36 # POSTCHECK: DW_AT_rnglists_base [DW_FORM_sec_offset]   (0x0000000c)
37 # POSTCHECK-EMPTY:
38 # POSTCHECK: DW_TAG_variable
39 # POSTCHECK: DW_AT_location [DW_FORM_loclistx]
40 # POSTCHECK-SAME: indexed (0x0)
41 # POSTCHECK-SAME: loclist = 0x00000014
42 # POSTCHECK-NEXT: [0x[[#ADDR]]
43 # POSTCHECK-SAME: 0x[[#ADDR + 0x6]]
44 # POSTCHECK-NEXT: [0x[[#ADDR + 0x6]]
45 # POSTCHECK-SAME: 0x[[#ADDR + 0xc]]
46 # POSTCHECK: DW_TAG_variable
47 # POSTCHECK: DW_AT_location [DW_FORM_loclistx]
48 # POSTCHECK-SAME: indexed (0x1)
49 # POSTCHECK-SAME: loclist = 0x0000002a
50 # POSTCHECK-NEXT: [0x[[#ADDR2]]
51 # POSTCHECK-SAME: 0x[[#ADDR2 + 0x2]]
53 # Checking second CU
54 # POSTCHECK: version = 0x0005
55 # POSTCHECK: DW_AT_loclists_base [DW_FORM_sec_offset]   (0x0000000c)
56 # POSTCHECK: DW_AT_rnglists_base [DW_FORM_sec_offset]   (0x00000025)
57 # POSTCHECK-NOT: DW_AT_location