109 lines · plain
1# Test object to verify dwarfdump handles dumping a DWARF v5 line table2# without an associated unit.3#4# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o - | \5# RUN: llvm-dwarfdump -v - | FileCheck %s6 7 .section .text8 # Dummy function9foo: ret10 11 .section .debug_line,"",@progbits12# CHECK-LABEL: .debug_line contents:13 14# DWARF v5 line-table header.15LH_5_start:16 .long LH_5_end-LH_5_version # Length of Unit (DWARF-32 format)17LH_5_version:18 .short 5 # DWARF version number19 .byte 8 # Address Size20 .byte 0 # Segment Selector Size21 .long LH_5_header_end-LH_5_params # Length of Prologue22LH_5_params:23 .byte 1 # Minimum Instruction Length24 .byte 1 # Maximum Operations per Instruction25 .byte 1 # Default is_stmt26 .byte -5 # Line Base27 .byte 14 # Line Range28 .byte 13 # Opcode Base29 .byte 0 # Standard Opcode Lengths30 .byte 131 .byte 132 .byte 133 .byte 134 .byte 035 .byte 036 .byte 037 .byte 138 .byte 039 .byte 040 .byte 141 # Directory table format42 .byte 1 # One element per directory entry43 .byte 1 # DW_LNCT_path44 .byte 0x0e # DW_FORM_strp (-> .debug_str)45 # Directory table entries46 .byte 2 # Two directory entries47 .long str_D148 .long str_D249 # File table format50 .byte 4 # Four elements per file entry51 .byte 2 # DW_LNCT_directory_index52 .byte 0x0b # DW_FORM_data153 .byte 1 # DW_LNCT_path54 .byte 0x1f # DW_FORM_line_strp (-> .debug_line_str)55 .byte 3 # DW_LNCT_timestamp56 .byte 0x0f # DW_FORM_udata57 .byte 4 # DW_LNCT_size58 .byte 0x0f # DW_FORM_udata59 # File table entries60 .byte 2 # Two file entries61 .byte 162 .long ls_F163 .byte 0x5164 .byte 0x5265 .byte 066 .long ls_F267 .byte 0x5368 .byte 0x5469LH_5_header_end:70 # Minimal line number program with an address in it, which shows71 # we picked up the address size from the line-table header.72 .byte 073 .byte 974 .byte 2 # DW_LNE_set_address75 .quad .text76 .byte 077 .byte 178 .byte 1 # DW_LNE_end_sequence79LH_5_end:80 81 .section .debug_str,"MS",@progbits,182str_D1: .asciz "Directory1"83str_D2: .asciz "Directory2"84 85 .section .debug_line_str,"MS",@progbits,186ls_F1: .asciz "File1"87ls_F2: .asciz "File2"88 89# CHECK: Line table prologue:90# CHECK: version: 591# CHECK: address_size: 892# CHECK: seg_select_size: 093# CHECK: max_ops_per_inst: 194# CHECK: include_directories[ 0] = .debug_str[0x00000000] = "Directory1"95# CHECK: include_directories[ 1] = .debug_str[0x0000000b] = "Directory2"96# CHECK-NOT: include_directories97# CHECK: file_names[ 0]:98# CHECK-NEXT: name: .debug_line_str[0x00000000] = "File1"99# CHECK-NEXT: dir_index: 1100# CHECK-NEXT: mod_time: 0x00000051101# CHECK-NEXT: length: 0x00000052102# CHECK: file_names[ 1]:103# CHECK-NEXT: name: .debug_line_str[0x00000006] = "File2"104# CHECK-NEXT: dir_index: 0105# CHECK-NEXT: mod_time: 0x00000053106# CHECK-NEXT: length: 0x00000054107# CHECK-NOT: file_names108# CHECK: 0x0000000000000000 {{.*}} is_stmt end_sequence109