80 lines · plain
1# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t2# RUN: %lldb %t -o "image lookup -v -s lookup_ranges" -o exit 2>%t.error | FileCheck %s3# RUN: cat %t.error | FileCheck %s --check-prefix ERROR4 5# ERROR: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000047) attribute, but range extraction failed (invalid range list offset 0x47),6# CHECK: Function: id = {0x0000001c}, name = "ranges", range = [0x0000000000000000-0x0000000000000004)7# CHECK: Blocks: id = {0x0000001c}, range = [0x00000000-0x00000004)8 9 .text10 .p2align 1211 .globl ranges12 .type ranges,@function13ranges: # @ranges14 nop15lookup_ranges:16 nop17 nop18 nop19.Lranges_end:20 .size ranges, .Lranges_end-ranges21 # -- End function22 .section .debug_str,"MS",@progbits,123.Lproducer:24 .asciz "Hand-written DWARF"25.Lranges:26 .asciz "ranges"27 28 .section .debug_abbrev,"",@progbits29 .byte 1 # Abbreviation Code30 .byte 17 # DW_TAG_compile_unit31 .byte 1 # DW_CHILDREN_yes32 .byte 37 # DW_AT_producer33 .byte 14 # DW_FORM_strp34 .byte 17 # DW_AT_low_pc35 .byte 1 # DW_FORM_addr36 .byte 18 # DW_AT_high_pc37 .byte 6 # DW_FORM_data438 .byte 0 # EOM(1)39 .byte 0 # EOM(2)40 .byte 2 # Abbreviation Code41 .byte 46 # DW_TAG_subprogram42 .byte 1 # DW_CHILDREN_yes43 .byte 17 # DW_AT_low_pc44 .byte 1 # DW_FORM_addr45 .byte 18 # DW_AT_high_pc46 .byte 6 # DW_FORM_data447 .byte 3 # DW_AT_name48 .byte 14 # DW_FORM_strp49 .byte 0 # EOM(1)50 .byte 0 # EOM(2)51 .byte 5 # Abbreviation Code52 .byte 11 # DW_TAG_lexical_block53 .byte 0 # DW_CHILDREN_no54 .byte 85 # DW_AT_ranges55 .byte 23 # DW_FORM_sec_offset56 .byte 0 # EOM(1)57 .byte 0 # EOM(2)58 .byte 0 # EOM(3)59 60 .section .debug_info,"",@progbits61.Lcu_begin0:62 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit63.Ldebug_info_start0:64 .short 4 # DWARF version number65 .long .debug_abbrev # Offset Into Abbrev. Section66 .byte 8 # Address Size (in bytes)67 .byte 1 # Abbrev [1] 0xb:0x7b DW_TAG_compile_unit68 .long .Lproducer # DW_AT_producer69 .quad ranges # DW_AT_low_pc70 .long .Lranges_end-ranges # DW_AT_high_pc71 .byte 2 # Abbrev [2] 0x2a:0x4d DW_TAG_subprogram72 .quad ranges # DW_AT_low_pc73 .long .Lranges_end-ranges # DW_AT_high_pc74 .long .Lranges # DW_AT_name75 .byte 5 # Abbrev [5] 0x61:0x15 DW_TAG_lexical_block76 .long 0x47 # DW_AT_ranges77 .byte 0 # End Of Children Mark78 .byte 0 # End Of Children Mark79.Ldebug_info_end0:80