1# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t 2# RUN: %lldb %t -o "image lookup -v -s lookup_ranges" -o exit 2>&1 | FileCheck %s 3 4# CHECK: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x47) attribute, but range extraction failed (No debug_ranges section), 5# CHECK: Function: id = {0x0000001c}, name = "ranges", range = [0x0000000000000000-0x0000000000000004) 6# CHECK: Blocks: id = {0x0000001c}, range = [0x00000000-0x00000004) 7 8 .text 9 .p2align 12 10 .globl ranges 11 .type ranges,@function 12ranges: # @ranges 13 nop 14lookup_ranges: 15 nop 16 nop 17 nop 18.Lranges_end: 19 .size ranges, .Lranges_end-ranges 20 # -- End function 21 .section .debug_str,"MS",@progbits,1 22.Lproducer: 23 .asciz "Hand-written DWARF" 24.Lranges: 25 .asciz "ranges" 26 27 .section .debug_abbrev,"",@progbits 28 .byte 1 # Abbreviation Code 29 .byte 17 # DW_TAG_compile_unit 30 .byte 1 # DW_CHILDREN_yes 31 .byte 37 # DW_AT_producer 32 .byte 14 # DW_FORM_strp 33 .byte 17 # DW_AT_low_pc 34 .byte 1 # DW_FORM_addr 35 .byte 18 # DW_AT_high_pc 36 .byte 6 # DW_FORM_data4 37 .byte 0 # EOM(1) 38 .byte 0 # EOM(2) 39 .byte 2 # Abbreviation Code 40 .byte 46 # DW_TAG_subprogram 41 .byte 1 # DW_CHILDREN_yes 42 .byte 17 # DW_AT_low_pc 43 .byte 1 # DW_FORM_addr 44 .byte 18 # DW_AT_high_pc 45 .byte 6 # DW_FORM_data4 46 .byte 3 # DW_AT_name 47 .byte 14 # DW_FORM_strp 48 .byte 0 # EOM(1) 49 .byte 0 # EOM(2) 50 .byte 5 # Abbreviation Code 51 .byte 11 # DW_TAG_lexical_block 52 .byte 0 # DW_CHILDREN_no 53 .byte 85 # DW_AT_ranges 54 .byte 23 # DW_FORM_sec_offset 55 .byte 0 # EOM(1) 56 .byte 0 # EOM(2) 57 .byte 0 # EOM(3) 58 59 .section .debug_info,"",@progbits 60.Lcu_begin0: 61 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 62.Ldebug_info_start0: 63 .short 4 # DWARF version number 64 .long .debug_abbrev # Offset Into Abbrev. Section 65 .byte 8 # Address Size (in bytes) 66 .byte 1 # Abbrev [1] 0xb:0x7b DW_TAG_compile_unit 67 .long .Lproducer # DW_AT_producer 68 .quad ranges # DW_AT_low_pc 69 .long .Lranges_end-ranges # DW_AT_high_pc 70 .byte 2 # Abbrev [2] 0x2a:0x4d DW_TAG_subprogram 71 .quad ranges # DW_AT_low_pc 72 .long .Lranges_end-ranges # DW_AT_high_pc 73 .long .Lranges # DW_AT_name 74 .byte 5 # Abbrev [5] 0x61:0x15 DW_TAG_lexical_block 75 .long 0x47 # DW_AT_ranges 76 .byte 0 # End Of Children Mark 77 .byte 0 # End Of Children Mark 78.Ldebug_info_end0: 79