1 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE1=0 -o %t1.o
2 # RUN: llvm-dwarfdump -debug-loc %t1.o 2>&1 | FileCheck %s
4 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE2=0 -o %t2.o
5 # RUN: llvm-dwarfdump -debug-loc %t2.o 2>&1 | FileCheck %s
7 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE3=0 -o %t3.o
8 # RUN: llvm-dwarfdump -debug-loc %t3.o 2>&1 | FileCheck %s
10 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE4=0 -o %t4.o
11 # RUN: llvm-dwarfdump -debug-loc %t4.o 2>&1 | FileCheck %s
13 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE5=0 -o %t5.o
14 # RUN: llvm-dwarfdump -debug-loc %t5.o 2>&1 | FileCheck %s
16 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE6=0 -o %t6.o
17 # RUN: llvm-dwarfdump -debug-loc %t6.o 2>&1 | FileCheck %s
19 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE7=0 -o %t7.o
20 # RUN: llvm-dwarfdump -debug-loc %t7.o 2>&1 | FileCheck %s --check-prefix=UNKNOWN-REG
22 # CHECK: error: unexpected end of data
24 # UNKNOWN-REG: [0x0000000000000000, 0x0000000000000001): DW_OP_regx 0xdeadbeef
26 .section .debug_loc,"",@progbits
31 .quad 0 # starting offset
34 .quad 0 # starting offset
35 .quad 1 # ending offset
38 .quad 0 # starting offset
39 .quad 1 # ending offset
40 .word 0 # Loc expr size
43 .quad 0 # starting offset
44 .quad 1 # ending offset
45 .word 0 # Loc expr size
46 .quad 0 # starting offset
49 .quad 0 # starting offset
50 .quad 1 # ending offset
51 .word 0xffff # Loc expr size
54 .quad 0 # starting offset
55 .quad 1 # ending offset
56 .word 2f-1f # Loc expr size
58 .byte 0x90 # DW_OP_regx
61 .quad 0 # starting offset
62 .quad 0 # ending offset
65 # A minimal compile unit is needed to deduce the address size of the location
67 .section .debug_info,"",@progbits
68 .long .Lcu_end0-.Lcu_begin0 # Length of Unit
70 .short 4 # DWARF version number
71 .long 0 # Offset Into Abbrev. Section
72 .byte 8 # Address Size (in bytes)
73 .byte 0 # End Of Children Mark