• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
2# RUN: llvm-dwarfdump -debug-loc %t.o | FileCheck %s
3
4# This checks that we do not try to interpret DW_OP_call_ref if it is
5# encountered in a location table.
6
7# CHECK: .debug_loc contents:
8# CHECK-NEXT: 0x00000000:
9# CHECK-NEXT:   (0x0000000000000000, 0x0000000000000015): <decoding error> 9a ff 00 00 00
10
11    .section .debug_loc, "", @progbits
12    .quad 0                         # Beginning address offset
13    .quad 0x15                      # Ending address offset
14    .short .LDescrEnd-.LDescrBegin  # Location description length
15.LDescrBegin:
16    .byte 0x9a                      # DW_OP_call_ref
17    .long 0xff
18.LDescrEnd:
19    .quad 0, 0                      # EOL entry
20
21# A dummy CU to provide the parser of .debug_loc with the address size.
22    .section .debug_info,"",@progbits
23    .long .LCUEnd-.LCUBegin         # Length of Unit
24.LCUBegin:
25    .short 4                        # DWARF version number
26    .long 0                         # Offset Into Abbrev. Section
27    .byte 8                         # Address Size
28.LCUEnd:
29