1# RUN: llvm-mc %s -filetype obj -triple i686-pc-linux -o %t 2 3## Check we don't crash when parsing invalid expression opcode. 4# RUN: llvm-dwarfdump %t | FileCheck %s 5# CHECK: DW_TAG_GNU_call_site_parameter 6# CHECK-NEXT: DW_AT_location (<decoding error> ff) 7 8## Check verifier reports an error. 9# RUN: not llvm-dwarfdump -verify %t 2>&1 | FileCheck %s --check-prefix=VERIFY 10# VERIFY: DIE contains invalid DWARF expression: 11# VERIFY: DW_TAG_GNU_call_site_parameter 12# VERIFY-NEXT: DW_AT_location (<decoding error> ff) 13 14.section .debug_info,"",@progbits 15 .long 0x12 16 .value 0x4 17 .long 0 18 .byte 0x4 19 20 .uleb128 0x1 # DW_TAG_compile_unit [1] 21 .long 0 22 .byte 0x0 23 24 .uleb128 0x2 # DW_TAG_GNU_call_site_parameter [2] 25 .uleb128 0x1 # Expression size. 26 .byte 0xff # Broken expression. 27 28 .byte 0 # End mark. 29 .byte 0 # End mark. 30 31.section .debug_abbrev,"",@progbits 32 .uleb128 0x1 # ID [1] 33 .uleb128 0x11 # DW_TAG_compile_unit, DW_CHILDREN_yes 34 .byte 0x1 35 .uleb128 0x25 # DW_AT_producer, DW_FORM_strp 36 .uleb128 0xe 37 .uleb128 0x13 # DW_AT_language, DW_FORM_data1 38 .uleb128 0xb 39 .byte 0 40 .byte 0 41 42 .uleb128 0x2 # ID [2] 43 .uleb128 0x410a # DW_TAG_GNU_call_site_parameter, DW_CHILDREN_no 44 .byte 0 45 .uleb128 0x2 # DW_AT_location, DW_FORM_exprloc 46 .uleb128 0x18 47 .byte 0 48 .byte 0 49 .byte 0 50 51.section .debug_str,"MS",@progbits,1 52.string "test" 53