195 lines · plain
1# RUN: mkdir -p %t.dir2# RUN: cd %t.dir3# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s >debug_loclists-dwo.o4# RUN: %lldb debug_loclists-dwo.o -o "image lookup -v -s lookup_loclists" -o exit | FileCheck %s5 6# CHECK-LABEL: image lookup -v -s lookup_loclists7# CHECK: Variable: {{.*}}, name = "x0", type = "int", valid ranges = <block>, location = [0x0000000000000000, 0x0000000000000003) -> DW_OP_reg0 RAX,8# CHECK: Variable: {{.*}}, name = "x1", type = "int", valid ranges = <block>, location = [0x0000000000000002, 0x0000000000000004) -> DW_OP_reg1 RDX,9 10loclists:11 nop12.Ltmp0:13 nop14.Ltmp1:15lookup_loclists:16 nop17.Ltmp2:18 nop19.Ltmp3:20 nop21.Lloclists_end:22 23 .section .debug_abbrev,"",@progbits24 .byte 1 # Abbreviation Code25 .byte 17 # DW_TAG_compile_unit26 .byte 0 # DW_CHILDREN_no27 .byte 0x76 # DW_AT_dwo_name28 .byte 8 # DW_FORM_string29 .byte 115 # DW_AT_addr_base30 .byte 23 # DW_FORM_sec_offset31 .byte 17 # DW_AT_low_pc32 .byte 1 # DW_FORM_addr33 .byte 85 # DW_AT_ranges34 .byte 35 # DW_FORM_rnglistx35 .byte 116 # DW_AT_rnglists_base36 .byte 23 # DW_FORM_sec_offset37 .byte 0 # EOM(1)38 .byte 0 # EOM(2)39 .byte 0 # EOM(3)40 41 .section .debug_info,"",@progbits42.Lcu_begin0:43 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit44.Ldebug_info_start0:45 .short 5 # DWARF version number46 .byte 4 # DWARF Unit Type47 .byte 8 # Address Size (in bytes)48 .long .debug_abbrev # Offset Into Abbrev. Section49 .quad 0xdeadbeefbaadf00d # DWO id50 .byte 1 # Abbrev [1] 0xc:0x5f DW_TAG_compile_unit51 .asciz "debug_loclists-dwo.o" # DW_AT_dwo_name52 .long .Laddr_table_base0 # DW_AT_addr_base53 .quad loclists # DW_AT_low_pc54 .byte 0 # DW_AT_ranges55 .long .Lskel_rnglists_table_base # DW_AT_rnglists_base56.Ldebug_info_end0:57 58 .section .debug_rnglists,"",@progbits59 .long .Lskel_rnglist_table_end-.Lskel_rnglist_table_start # Length60.Lskel_rnglist_table_start:61 .short 5 # Version62 .byte 8 # Address size63 .byte 0 # Segment selector size64 .long 1 # Offset entry count65.Lskel_rnglists_table_base:66 .long .Lskel_ranges0-.Lskel_rnglists_table_base67.Lskel_ranges0:68 .byte 7 # DW_RLE_start_length69 .quad loclists70 .uleb128 .Lloclists_end-loclists71 .byte 0 # DW_RLE_end_of_list72.Lskel_rnglist_table_end:73 .section .debug_addr,"",@progbits74 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution75.Ldebug_addr_start0:76 .short 5 # DWARF version number77 .byte 8 # Address size78 .byte 0 # Segment selector size79.Laddr_table_base0:80 .quad loclists81 .quad .Ltmp182.Ldebug_addr_end0:83 84# The presence of an extra non-dwo loclists section should not confuse us.85# .debug_info.dwo always refers to .debug_loclists.dwo86 .section .debug_loclists,"",@progbits87 .quad 0xdeadbeefbaadf00d88 89 .section .debug_loclists.dwo,"e",@progbits90 .long .Ldebug_loclist_table_end0-.Ldebug_loclist_table_start0 # Length91.Ldebug_loclist_table_start0:92 .short 5 # Version93 .byte 8 # Address size94 .byte 0 # Segment selector size95 .long 2 # Offset entry count96.Lloclists_table_base:97 .long .Ldebug_loc0-.Lloclists_table_base98 .long .Ldebug_loc1-.Lloclists_table_base99.Ldebug_loc0:100 .byte 4 # DW_LLE_offset_pair101 .uleb128 loclists-loclists102 .uleb128 .Ltmp2-loclists103 .uleb128 1 # Expression size104 .byte 80 # super-register DW_OP_reg0105 .byte 0 # DW_LLE_end_of_list106.Ldebug_loc1:107 .byte 3 # DW_LLE_startx_length108 .uleb128 1109 .uleb128 .Ltmp3-.Ltmp1110 .uleb128 1 # Expression size111 .byte 81 # super-register DW_OP_reg1112 .byte 0 # DW_LLE_end_of_list113.Ldebug_loclist_table_end0:114 115 .section .debug_abbrev.dwo,"e",@progbits116 .byte 1 # Abbreviation Code117 .byte 17 # DW_TAG_compile_unit118 .byte 1 # DW_CHILDREN_yes119 .byte 37 # DW_AT_producer120 .byte 8 # DW_FORM_string121 .byte 19 # DW_AT_language122 .byte 5 # DW_FORM_data2123 .byte 0 # EOM(1)124 .byte 0 # EOM(2)125 .byte 2 # Abbreviation Code126 .byte 46 # DW_TAG_subprogram127 .byte 1 # DW_CHILDREN_yes128 .byte 17 # DW_AT_low_pc129 .byte 27 # DW_FORM_addrx130 .byte 18 # DW_AT_high_pc131 .byte 6 # DW_FORM_data4132 .byte 3 # DW_AT_name133 .byte 8 # DW_FORM_string134 .byte 73 # DW_AT_type135 .byte 19 # DW_FORM_ref4136 .byte 0 # EOM(1)137 .byte 0 # EOM(2)138 .byte 3 # Abbreviation Code139 .byte 5 # DW_TAG_formal_parameter140 .byte 0 # DW_CHILDREN_no141 .byte 2 # DW_AT_location142 .byte 0x22 # DW_FORM_loclistx143 .byte 3 # DW_AT_name144 .byte 8 # DW_FORM_string145 .byte 73 # DW_AT_type146 .byte 19 # DW_FORM_ref4147 .byte 0 # EOM(1)148 .byte 0 # EOM(2)149 .byte 4 # Abbreviation Code150 .byte 36 # DW_TAG_base_type151 .byte 0 # DW_CHILDREN_no152 .byte 3 # DW_AT_name153 .byte 8 # DW_FORM_string154 .byte 62 # DW_AT_encoding155 .byte 11 # DW_FORM_data1156 .byte 11 # DW_AT_byte_size157 .byte 11 # DW_FORM_data1158 .byte 0 # EOM(1)159 .byte 0 # EOM(2)160 .byte 0 # EOM(3)161 162 .section .debug_info.dwo,"e",@progbits163.Lcu_begin1:164 .long .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit165.Ldebug_info_start1:166 .short 5 # DWARF version number167 .byte 5 # DWARF Unit Type168 .byte 8 # Address Size (in bytes)169 .long .debug_abbrev # Offset Into Abbrev. Section170 .quad 0xdeadbeefbaadf00d # DWO id171 .byte 1 # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit172 .asciz "Hand-written DWARF" # DW_AT_producer173 .short 12 # DW_AT_language174 .byte 2 # Abbrev [2] 0x2a:0x29 DW_TAG_subprogram175 .byte 0 # DW_AT_low_pc176 .long .Lloclists_end-loclists # DW_AT_high_pc177 .asciz "loclists" # DW_AT_name178 .long .Lint # DW_AT_type179 .byte 3 # Abbrev [3] DW_TAG_formal_parameter180 .uleb128 0 # DW_AT_location181 .asciz "x0" # DW_AT_name182 .long .Lint # DW_AT_type183 .byte 3 # Abbrev [3] DW_TAG_formal_parameter184 .uleb128 1 # DW_AT_location185 .asciz "x1" # DW_AT_name186 .long .Lint # DW_AT_type187 .byte 0 # End Of Children Mark188.Lint:189 .byte 4 # Abbrev [4] 0x53:0x7 DW_TAG_base_type190 .asciz "int" # DW_AT_name191 .byte 5 # DW_AT_encoding192 .byte 4 # DW_AT_byte_size193 .byte 0 # End Of Children Mark194.Ldebug_info_end1:195