xref: /llvm-project/llvm/test/tools/llvm-dwarfdump/X86/debug_line_dwarf64_large_table.s (revision 6aa94c64a532237674433713a70ec2bda57b4fed)
1## Test that we can dump the (intact) prologue of a large table which was
2## truncated. Also, make sure we don't get confused by a DWARF64 length which
3## matches one of the reserved initial length values.
4
5# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux %s >%t
6# RUN: llvm-dwarfdump %t -debug-line 2>&1 | FileCheck %s
7
8# CHECK: debug_line[0x00000000]
9# CHECK-NEXT: Line table prologue:
10# CHECK-NEXT:     total_length: 0x00000000fffffff0
11# CHECK-NEXT:           format: DWARF64
12# CHECK-NEXT:          version: 4
13# CHECK-NEXT:  prologue_length: 0x0000000000000016
14# CHECK:        file_names[ 1]:
15# CHECK-NEXT:             name: "file1"
16# CHECK-NEXT:        dir_index: 0
17# CHECK-NEXT:         mod_time: 0x00000000
18# CHECK-NEXT:           length: 0x00000000
19# CHECK-NEXT: warning: line table program with offset 0x00000000 has length 0xfffffffc but only 0x0000003a bytes are available
20
21# CHECK:      0x000000000badbeef      1      0      1   0             0       0  is_stmt end_sequence
22
23.section .debug_line,"",@progbits
24.long   0xffffffff      # Length of Unit (DWARF-64 format)
25.quad   0xfffffff0
26.short  4               # DWARF version number
27.quad   .Lprologue1_end-.Lprologue1_start # Length of Prologue
28.Lprologue1_start:
29.byte   1               # Minimum Instruction Length
30.byte   1               # Maximum Operations per Instruction
31.byte   1               # Default is_stmt
32.byte   -5              # Line Base
33.byte   14              # Line Range
34.byte   1               # Opcode Base
35.asciz "dir1"           # Include table
36.byte   0
37.asciz "file1"          # File table
38.byte   0, 0, 0
39.byte   0
40.Lprologue1_end:
41.byte   0, 9, 2         # DW_LNE_set_address
42.quad   0x0badbeef
43.byte   0, 1, 1         # DW_LNE_end_sequence
44