16fb16316SGeorge Rimar# REQUIRES: x86 26fb16316SGeorge Rimar# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o 36fb16316SGeorge Rimar# RUN: ld.lld --gdb-index %t1.o -o %t 465b79a54SAdrian Prantl# RUN: llvm-dwarfdump -gdb-index %t | FileCheck %s 56fb16316SGeorge Rimar 617a7b49eSFangrui Song# CHECK: .gdb_index contents: 76fb16316SGeorge Rimar# CHECK: Address area offset = 0x28, has 2 entries: 8*d4306e90SFangrui Song# CHECK-NEXT: Low/High address = [0x201120, 0x201121) (Size: 0x1), CU id = 0 9*d4306e90SFangrui Song# CHECK-NEXT: Low/High address = [0x201123, 0x201126) (Size: 0x3), CU id = 0 106fb16316SGeorge Rimar 116fb16316SGeorge Rimar.text 126fb16316SGeorge Rimar.globl foo 136fb16316SGeorge Rimar.type foo,@function 146fb16316SGeorge Rimarfoo: 156fb16316SGeorge Rimar.Lfunc_begin0: 166fb16316SGeorge Rimar nop 176fb16316SGeorge Rimar.Ltmp0: 186fb16316SGeorge Rimar nop 196fb16316SGeorge Rimar nop 206fb16316SGeorge Rimar.Ltmp1: 216fb16316SGeorge Rimar nop 226fb16316SGeorge Rimar nop 236fb16316SGeorge Rimar nop 246fb16316SGeorge Rimar.Ltmp2: 256fb16316SGeorge Rimar 266fb16316SGeorge Rimar.section .debug_abbrev,"",@progbits 276fb16316SGeorge Rimar.byte 1 # Abbreviation Code 286fb16316SGeorge Rimar.byte 17 # DW_TAG_compile_unit 296fb16316SGeorge Rimar.byte 0 # DW_CHILDREN_no 306fb16316SGeorge Rimar.byte 37 # DW_AT_producer 316fb16316SGeorge Rimar.byte 14 # DW_FORM_strp 326fb16316SGeorge Rimar.byte 19 # DW_AT_language 336fb16316SGeorge Rimar.byte 5 # DW_FORM_data2 346fb16316SGeorge Rimar.byte 3 # DW_AT_name 356fb16316SGeorge Rimar.byte 14 # DW_FORM_strp 366fb16316SGeorge Rimar.byte 16 # DW_AT_stmt_list 376fb16316SGeorge Rimar.byte 23 # DW_FORM_sec_offset 386fb16316SGeorge Rimar.byte 27 # DW_AT_comp_dir 396fb16316SGeorge Rimar.byte 14 # DW_FORM_strp 406fb16316SGeorge Rimar.byte 17 # DW_AT_low_pc 416fb16316SGeorge Rimar.byte 1 # DW_FORM_addr 426fb16316SGeorge Rimar.byte 85 # DW_AT_ranges 436fb16316SGeorge Rimar.byte 23 # DW_FORM_sec_offset 446fb16316SGeorge Rimar.byte 0 # EOM(1) 456fb16316SGeorge Rimar.byte 0 # EOM(2) 466fb16316SGeorge Rimar.byte 0 # EOM(3) 476fb16316SGeorge Rimar 486fb16316SGeorge Rimar.section .debug_info,"",@progbits 496fb16316SGeorge Rimar.Lcu_begin0: 506fb16316SGeorge Rimar.long 38 # Length of Unit 516fb16316SGeorge Rimar.short 4 # DWARF version number 526fb16316SGeorge Rimar.long .debug_abbrev # Offset Into Abbrev. Section 536fb16316SGeorge Rimar.byte 8 # Address Size (in bytes) 546fb16316SGeorge Rimar.byte 1 # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit 556fb16316SGeorge Rimar.long 0 # DW_AT_producer 566fb16316SGeorge Rimar.short 4 # DW_AT_language 576fb16316SGeorge Rimar.long 0 # DW_AT_name 586fb16316SGeorge Rimar.long 0 # DW_AT_stmt_list 596fb16316SGeorge Rimar.long 0 # DW_AT_comp_dir 606fb16316SGeorge Rimar.quad .Lfunc_begin0 # DW_AT_low_pc 616fb16316SGeorge Rimar.long .Ldebug_ranges0 # DW_AT_ranges 626fb16316SGeorge Rimar 636fb16316SGeorge Rimar.section .debug_ranges,"",@progbits 646fb16316SGeorge Rimar.Ldebug_ranges0: 656fb16316SGeorge Rimar .quad .Lfunc_begin0-.Lfunc_begin0 666fb16316SGeorge Rimar .quad .Ltmp0-.Lfunc_begin0 676fb16316SGeorge Rimar .quad .Ltmp1-.Lfunc_begin0 686fb16316SGeorge Rimar .quad .Ltmp2-.Lfunc_begin0 696fb16316SGeorge Rimar .quad 0 706fb16316SGeorge Rimar .quad 0 71