107 lines · plain
1# This test that we don't get confused by line tables containing a tombstone2# (-1) value, as produced by recent lld's. Line sequences with the tombstone3# value should be completely ignored. The tombstone sequence is deliberately4# longer so that any attempt at an address binary search will likely land inside5# the sequence.6 7# RUN: llvm-mc --filetype=obj --triple=x86_64-pc-linux %s -o %t8# RUN: %lldb -o "image lookup -n main -v" -o "image dump line-table main.cpp" \9# RUN: -o exit %t | FileCheck %s10 11# CHECK-LABEL: image lookup -n main -v12# CHECK: LineEntry: [0x0000000000001000-0x0000000000001001): main.cpp:113# CHECK-LABEL: image dump line-table main.cpp14# CHECK-NEXT: Line table for main.cpp15# CHECK-NEXT: 0x0000000000001000: main.cpp:116# CHECK-NEXT: 0x0000000000001001: main.cpp:117# CHECK-EMPTY:18# CHECK-NEXT: exit19 20 .text21.space 0x100022main:23 nop24.Lmain_end:25 26 .section .debug_abbrev,"",@progbits27 .byte 1 # Abbreviation Code28 .byte 17 # DW_TAG_compile_unit29 .byte 0 # DW_CHILDREN_no30 .byte 37 # DW_AT_producer31 .byte 8 # DW_FORM_string32 .byte 3 # DW_AT_name33 .byte 8 # DW_FORM_string34 .byte 16 # DW_AT_stmt_list35 .byte 23 # DW_FORM_sec_offset36 .byte 17 # DW_AT_low_pc37 .byte 1 # DW_FORM_addr38 .byte 18 # DW_AT_high_pc39 .byte 6 # DW_FORM_data440 .byte 0 # EOM(1)41 .byte 0 # EOM(2)42 .byte 0 # EOM(3)43 44 .section .debug_info,"",@progbits45.Lcu_begin0:46 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit47.Ldebug_info_start0:48 .short 4 # DWARF version number49 .long 0 # Offset Into Abbrev. Section50 .byte 8 # Address Size (in bytes)51 .byte 1 # Abbrev [1] 0xb:0xc4 DW_TAG_compile_unit52 .asciz "Hand-written DWARF" # DW_AT_producer53 .asciz "main.cpp" # DW_AT_name54 .long 0 # DW_AT_stmt_list55 .quad main-.text # DW_AT_low_pc56 .long .Lmain_end-main # DW_AT_high_pc57.Ldebug_info_end0:58 59.section .debug_line,"",@progbits60 .long .Llt1_end - .Llt1_start # Length of Unit (DWARF-32 format)61.Llt1_start:62 .short 4 # DWARF version number63 .long .Lprologue1_end-.Lprologue1_start # Length of Prologue64.Lprologue1_start:65 .byte 1 # Minimum Instruction Length66 .byte 1 # Maximum Operations per Instruction67 .byte 1 # Default is_stmt68 .byte -5 # Line Base69 .byte 14 # Line Range70 .byte 13 # Opcode Base71 .byte 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 # Standard Opcode Lengths72 .byte 073 .asciz "main.cpp" # File table74 .byte 0, 0, 075 .byte 076.Lprologue1_end:77 .byte 0, 9, 2 # DW_LNE_set_address78 .quad -179 .byte 1 # DW_LNS_copy80 .byte 33 # address += 1, line += 181 .byte 33 # address += 1, line += 182 .byte 33 # address += 1, line += 183 .byte 33 # address += 1, line += 184 .byte 33 # address += 1, line += 185 .byte 33 # address += 1, line += 186 .byte 33 # address += 1, line += 187 .byte 33 # address += 1, line += 188 .byte 33 # address += 1, line += 189 .byte 33 # address += 1, line += 190 .byte 33 # address += 1, line += 191 .byte 33 # address += 1, line += 192 .byte 33 # address += 1, line += 193 .byte 33 # address += 1, line += 194 .byte 33 # address += 1, line += 195 .byte 2 # DW_LNS_advance_pc96 .uleb128 197 .byte 0, 1, 1 # DW_LNE_end_sequence98 99 .byte 0, 9, 2 # DW_LNE_set_address100 .quad main-.text101 .byte 18 # address += 0, line += 0102 .byte 2 # DW_LNS_advance_pc103 .uleb128 1104 .byte 0, 1, 1 # DW_LNE_end_sequence105.Llt1_end:106 107