1# RUN: cd %T 2# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s >debug_rnglists-dwo.o 3# RUN: %lldb debug_rnglists-dwo.o -o "image lookup -v -s lookup_rnglists" \ 4# RUN: -o exit | FileCheck %s 5 6# CHECK-LABEL: image lookup -v -s lookup_rnglists 7# CHECK: Function: id = {0x4000000000000028}, name = "rnglists", range = [0x0000000000000000-0x0000000000000003) 8# CHECK: Blocks: id = {0x4000000000000028}, range = [0x00000000-0x00000003) 9# CHECK-NEXT: id = {0x4000000000000037}, range = [0x00000001-0x00000002) 10 11 .text 12rnglists: 13 nop 14.Lblock1_begin: 15lookup_rnglists: 16 nop 17.Lblock1_end: 18 nop 19.Lrnglists_end: 20 21 .section .debug_abbrev,"",@progbits 22 .byte 1 # Abbreviation Code 23 .byte 17 # DW_TAG_compile_unit 24 .byte 0 # DW_CHILDREN_no 25 .byte 0x76 # DW_AT_dwo_name 26 .byte 8 # DW_FORM_string 27 .byte 115 # DW_AT_addr_base 28 .byte 23 # DW_FORM_sec_offset 29 .byte 85 # DW_AT_ranges 30 .byte 35 # DW_FORM_rnglistx 31 .byte 116 # DW_AT_rnglists_base 32 .byte 23 # DW_FORM_sec_offset 33 .byte 0 # EOM(1) 34 .byte 0 # EOM(2) 35 .byte 0 # EOM(3) 36 37 .section .debug_info,"",@progbits 38.Lcu_begin0: 39 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 40.Ldebug_info_start0: 41 .short 5 # DWARF version number 42 .byte 4 # DWARF Unit Type 43 .byte 8 # Address Size (in bytes) 44 .long .debug_abbrev # Offset Into Abbrev. Section 45 .quad 0xdeadbeefbaadf00d # DWO id 46 .byte 1 # Abbrev [1] 0xc:0x5f DW_TAG_compile_unit 47 .asciz "debug_rnglists-dwo.o" # DW_AT_dwo_name 48 .long .Laddr_table_base0 # DW_AT_addr_base 49 .byte 0 # DW_AT_ranges 50 .long .Lskel_rnglists_table_base # DW_AT_rnglists_base 51.Ldebug_info_end0: 52 53 .section .debug_addr,"",@progbits 54 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution 55.Ldebug_addr_start0: 56 .short 5 # DWARF version number 57 .byte 8 # Address size 58 .byte 0 # Segment selector size 59.Laddr_table_base0: 60 .quad rnglists 61 .quad .Lblock1_begin 62.Ldebug_addr_end0: 63 64 .section .debug_rnglists,"",@progbits 65 # A fake rnglists contribution so that range list bases for the skeleton 66 # and split units differ. 67 .long .Lfake_rnglist_table_end-.Lfake_rnglist_table_start # Length 68.Lfake_rnglist_table_start: 69 .short 5 # Version 70 .byte 8 # Address size 71 .byte 0 # Segment selector size 72 .long 0 # Offset entry count 73.Lfake_rnglists_table_base: 74.Lfake_rnglist_table_end: 75 76 .long .Lskel_rnglist_table_end-.Lskel_rnglist_table_start # Length 77.Lskel_rnglist_table_start: 78 .short 5 # Version 79 .byte 8 # Address size 80 .byte 0 # Segment selector size 81 .long 1 # Offset entry count 82.Lskel_rnglists_table_base: 83 .long .Lskel_ranges0-.Lskel_rnglists_table_base 84.Lskel_ranges0: 85 .byte 7 # DW_RLE_start_length 86 .quad rnglists 87 .uleb128 .Lrnglists_end-rnglists 88 .byte 0 # DW_RLE_end_of_list 89.Lskel_rnglist_table_end: 90 91 .section .debug_abbrev.dwo,"e",@progbits 92 .byte 1 # Abbreviation Code 93 .byte 17 # DW_TAG_compile_unit 94 .byte 1 # DW_CHILDREN_yes 95 .byte 37 # DW_AT_producer 96 .byte 8 # DW_FORM_string 97 .byte 0 # EOM(1) 98 .byte 0 # EOM(2) 99 .byte 2 # Abbreviation Code 100 .byte 46 # DW_TAG_subprogram 101 .byte 1 # DW_CHILDREN_yes 102 .byte 17 # DW_AT_low_pc 103 .byte 27 # DW_FORM_addrx 104 .byte 18 # DW_AT_high_pc 105 .byte 6 # DW_FORM_data4 106 .byte 3 # DW_AT_name 107 .byte 8 # DW_FORM_string 108 .byte 0 # EOM(1) 109 .byte 0 # EOM(2) 110 .byte 5 # Abbreviation Code 111 .byte 11 # DW_TAG_lexical_block 112 .byte 0 # DW_CHILDREN_no 113 .byte 85 # DW_AT_ranges 114 .byte 35 # DW_FORM_rnglistx 115 .byte 0 # EOM(1) 116 .byte 0 # EOM(2) 117 .byte 0 # EOM(3) 118 119 .section .debug_info.dwo,"e",@progbits 120.Lcu_begin1: 121 .long .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit 122.Ldebug_info_start1: 123 .short 5 # DWARF version number 124 .byte 5 # DWARF Unit Type 125 .byte 8 # Address Size (in bytes) 126 .long .debug_abbrev # Offset Into Abbrev. Section 127 .quad 0xdeadbeefbaadf00d # DWO id 128 .byte 1 # Abbrev [1] 0xc:0x5f DW_TAG_compile_unit 129 .asciz "Hand-written DWARF" # DW_AT_producer 130 .byte 2 # Abbrev [2] 0x2b:0x37 DW_TAG_subprogram 131 .byte 0 # DW_AT_low_pc 132 .long .Lrnglists_end-rnglists # DW_AT_high_pc 133 .asciz "rnglists" # DW_AT_name 134 .byte 5 # Abbrev [5] 0x52:0xf DW_TAG_lexical_block 135 .byte 0 # DW_AT_ranges 136 .byte 0 # End Of Children Mark 137 .byte 0 # End Of Children Mark 138.Ldebug_info_end1: 139 140 .section .debug_rnglists.dwo,"e",@progbits 141 .long .Ldwo_rnglist_table_end-.Ldwo_rnglist_table_start # Length 142.Ldwo_rnglist_table_start: 143 .short 5 # Version 144 .byte 8 # Address size 145 .byte 0 # Segment selector size 146 .long 1 # Offset entry count 147.Ldwo_rnglists_table_base: 148 .long .Ldwo_ranges-.Ldwo_rnglists_table_base 149.Ldwo_ranges: 150 .byte 3 # DW_RLE_startx_length 151 .uleb128 1 152 .uleb128 .Lblock1_end-.Lblock1_begin 153 .byte 0 # DW_RLE_end_of_list 154.Ldwo_rnglist_table_end: 155