1bd546e59SPavel Labath# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE1=0 -o %t1.o 2*8d9070e0SJames Henderson# RUN: not llvm-dwarfdump -debug-loclists %t1.o 2>&1 | FileCheck %s --check-prefix=ULEB -DOFFSET=0x0000000d 3bd546e59SPavel Labath 4bd546e59SPavel Labath# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE2=0 -o %t2.o 5*8d9070e0SJames Henderson# RUN: not llvm-dwarfdump -debug-loclists %t2.o 2>&1 | FileCheck %s --check-prefix=ULEB -DOFFSET=0x0000000e 6bd546e59SPavel Labath 7bd546e59SPavel Labath# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE3=0 -o %t3.o 8*8d9070e0SJames Henderson# RUN: not llvm-dwarfdump -debug-loclists %t3.o 2>&1 | FileCheck %s --check-prefix=ULEB -DOFFSET=0x0000000f 9bd546e59SPavel Labath 10bd546e59SPavel Labath# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE4=0 -o %t4.o 11208a11abSDavid Blaikie# RUN: not llvm-dwarfdump -debug-loclists %t4.o 2>&1 | FileCheck %s 12bd546e59SPavel Labath 13bd546e59SPavel Labath# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE5=0 -o %t5.o 14208a11abSDavid Blaikie# RUN: not llvm-dwarfdump -debug-loclists %t5.o 2>&1 | FileCheck %s 15bd546e59SPavel Labath 16bd546e59SPavel Labath# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE6=0 -o %t6.o 17208a11abSDavid Blaikie# RUN: not llvm-dwarfdump -debug-loclists %t6.o 2>&1 | FileCheck %s 18bd546e59SPavel Labath 19bd546e59SPavel Labath# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE7=0 -o %t7.o 20208a11abSDavid Blaikie# RUN: not llvm-dwarfdump -debug-loclists %t7.o 2>&1 | FileCheck %s --check-prefix=UNIMPL 21bd546e59SPavel Labath 22bd546e59SPavel Labath# CHECK: error: unexpected end of data 23*8d9070e0SJames Henderson# ULEB: error: unable to decode LEB128 at offset [[OFFSET]]: malformed uleb128, extends past end 24bd546e59SPavel Labath# UNIMPL: error: LLE of kind 47 not supported 25bd546e59SPavel Labath 26bd546e59SPavel Labath.section .debug_loclists,"",@progbits 27bd546e59SPavel Labath .long .Ldebug_loclist_table_end0-.Ldebug_loclist_table_start0 28bd546e59SPavel Labath.Ldebug_loclist_table_start0: 29bd546e59SPavel Labath .short 5 # Version. 30bd546e59SPavel Labath .byte 8 # Address size. 31bd546e59SPavel Labath .byte 0 # Segment selector size. 32bd546e59SPavel Labath .long 0 # Offset entry count. 33bd546e59SPavel Labath.Lloclists_table_base0: 34bd546e59SPavel Labath.Ldebug_loc0: 35bd546e59SPavel Labath.ifdef CASE1 36bd546e59SPavel Labath .byte 4 # DW_LLE_offset_pair 37bd546e59SPavel Labath.endif 38bd546e59SPavel Labath.ifdef CASE2 39bd546e59SPavel Labath .byte 4 # DW_LLE_offset_pair 40bd546e59SPavel Labath .uleb128 0x0 # starting offset 41bd546e59SPavel Labath.endif 42bd546e59SPavel Labath.ifdef CASE3 43bd546e59SPavel Labath .byte 4 # DW_LLE_offset_pair 44bd546e59SPavel Labath .uleb128 0x0 # starting offset 45bd546e59SPavel Labath .uleb128 0x10 # ending offset 46bd546e59SPavel Labath.endif 47bd546e59SPavel Labath.ifdef CASE4 48bd546e59SPavel Labath .byte 4 # DW_LLE_offset_pair 49bd546e59SPavel Labath .uleb128 0x0 # starting offset 50bd546e59SPavel Labath .uleb128 0x10 # ending offset 51bd546e59SPavel Labath .byte 1 # Loc expr size 52bd546e59SPavel Labath.endif 53bd546e59SPavel Labath.ifdef CASE5 54bd546e59SPavel Labath .byte 4 # DW_LLE_offset_pair 55bd546e59SPavel Labath .uleb128 0x0 # starting offset 56bd546e59SPavel Labath .uleb128 0x10 # ending offset 57bd546e59SPavel Labath .byte 1 # Loc expr size 58bd546e59SPavel Labath .byte 117 # DW_OP_breg5 59bd546e59SPavel Labath.endif 60bd546e59SPavel Labath.ifdef CASE6 61bd546e59SPavel Labath .byte 4 # DW_LLE_offset_pair 62bd546e59SPavel Labath .uleb128 0x0 # starting offset 63bd546e59SPavel Labath .uleb128 0x10 # ending offset 64bd546e59SPavel Labath .uleb128 0xdeadbeef # Loc expr size 65bd546e59SPavel Labath.endif 66bd546e59SPavel Labath.ifdef CASE7 67bd546e59SPavel Labath .byte 0x47 68bd546e59SPavel Labath.endif 69bd546e59SPavel Labath 70bd546e59SPavel Labath.Ldebug_loclist_table_end0: 71bd546e59SPavel Labath 72