1# Test that an empty .debug_aranges section doesn't confuse (or crash) us. 2 3# REQUIRES: x86 4 5# RUN: llvm-mc %s -triple x86_64-pc-linux -filetype=obj >%t 6# RUN: %lldb %t -o "breakpoint set -n f" -b | FileCheck %s 7 8# CHECK: Breakpoint 1: where = {{.*}}`f, address = 0x0000000000000047 9 10 .text 11 .globl f # -- Begin function f 12 .type f,@function 13 .rept 0x47 14 nop 15 .endr 16f: # @f 17.Lfunc_begin0: 18 retq 19.Lfunc_end0: 20 .size f, .Lfunc_end0-f 21 # -- End function 22 .section .debug_str,"MS",@progbits,1 23.Linfo_string3: 24 .asciz "f" # string offset=83 25 .section .debug_abbrev,"",@progbits 26 .byte 1 # Abbreviation Code 27 .byte 17 # DW_TAG_compile_unit 28 .byte 1 # DW_CHILDREN_yes 29 .byte 17 # DW_AT_low_pc 30 .byte 1 # DW_FORM_addr 31 .byte 18 # DW_AT_high_pc 32 .byte 6 # DW_FORM_data4 33 .byte 0 # EOM(1) 34 .byte 0 # EOM(2) 35 .byte 2 # Abbreviation Code 36 .byte 46 # DW_TAG_subprogram 37 .byte 0 # DW_CHILDREN_no 38 .byte 17 # DW_AT_low_pc 39 .byte 1 # DW_FORM_addr 40 .byte 18 # DW_AT_high_pc 41 .byte 6 # DW_FORM_data4 42 .byte 3 # DW_AT_name 43 .byte 14 # DW_FORM_strp 44 .byte 0 # EOM(1) 45 .byte 0 # EOM(2) 46 .byte 0 # EOM(3) 47 .section .debug_info,"",@progbits 48.Lcu_begin0: 49 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 50.Ldebug_info_start0: 51 .short 4 # DWARF version number 52 .long .debug_abbrev # Offset Into Abbrev. Section 53 .byte 8 # Address Size (in bytes) 54 .byte 1 # Abbrev [1] 0xb:0x35 DW_TAG_compile_unit 55 .quad .Lfunc_begin0 # DW_AT_low_pc 56 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 57 .byte 2 # Abbrev [2] 0x2a:0x15 DW_TAG_subprogram 58 .quad .Lfunc_begin0 # DW_AT_low_pc 59 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 60 .long .Linfo_string3 # DW_AT_name 61 .byte 0 # End Of Children Mark 62.Ldebug_info_end0: 63 64 .section ".note.GNU-stack","",@progbits 65 .section .debug_aranges,"",@progbits 66