76 lines · plain
1# This test sets non-zero Die Offset Base field in the accelerator table header,2# and makes sure it is added to the DW_FORM_ref*** forms.3 4# RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o %t5# RUN: llvm-dwarfdump -find=main %t | FileCheck %s6 7# CHECK: DW_TAG_subprogram8# CHECK-NEXT: DW_AT_name ("main")9# CHECK-NEXT: DW_AT_external10 11 .section __DWARF,__debug_str,regular,debug12Ldebug_str:13Lstring_producer:14 .asciz "Hand-written dwarf"15Lstring_main:16 .asciz "main"17 18 .section __DWARF,__debug_abbrev,regular,debug19 .byte 1 # Abbreviation Code20 .byte 17 # DW_TAG_compile_unit21 .byte 1 # DW_CHILDREN_yes22 .byte 37 # DW_AT_producer23 .byte 14 # DW_FORM_strp24 .byte 19 # DW_AT_language25 .byte 5 # DW_FORM_data226 .byte 0 # EOM(1)27 .byte 0 # EOM(2)28 .byte 2 # Abbreviation Code29 .byte 46 # DW_TAG_subprogram30 .byte 0 # DW_CHILDREN_no31 .byte 3 # DW_AT_name32 .byte 14 # DW_FORM_strp33 .byte 63 # DW_AT_external34 .byte 25 # DW_FORM_flag_present35 .byte 0 # EOM(1)36 .byte 0 # EOM(2)37 .byte 0 # EOM(3)38 39 .section __DWARF,__debug_info,regular,debug40Ldebug_info:41 .long Lcu_end0-Lcu_start0 # Length of Unit42Lcu_start0:43 .short 4 # DWARF version number44 .long 0 # Offset Into Abbrev. Section45 .byte 8 # Address Size (in bytes)46 .byte 1 # Abbrev [1] DW_TAG_compile_unit47 .long Lstring_producer-Ldebug_str # DW_AT_producer48 .short 12 # DW_AT_language49Ldie_main:50 .byte 2 # Abbrev [2] DW_TAG_subprogram51 .long Lstring_main-Ldebug_str # DW_AT_name52 # DW_AT_external53 .byte 0 # End Of Children Mark54Lcu_end0:55 56 .section __DWARF,__apple_names,regular,debug57Lnames_begin:58 .long 1212240712 ## Header Magic59 .short 1 ## Header Version60 .short 0 ## Header Hash Function61 .long 1 ## Header Bucket Count62 .long 1 ## Header Hash Count63 .long 12 ## Header Data Length64 .long 1 ## HeaderData Die Offset Base65 .long 1 ## HeaderData Atom Count66 .short 1 ## DW_ATOM_die_offset67 .short 0x13 ## DW_FORM_ref468 .long 0 ## Bucket 069 .long 2090499946 ## Hash in Bucket 070 .long LNames0-Lnames_begin ## Offset in Bucket 071LNames0:72 .long Lstring_main-Ldebug_str ## main73 .long 1 ## Num DIEs74 .long Ldie_main-Ldebug_info-175 .long 076