2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 # RUN: ld.lld --gdb-index -e main %t.o -o %t
4 # RUN: llvm-dwarfdump -gdb-index %t | FileCheck %s
6 # CHECK: .gdb_index contents:
7 # CHECK: Address area offset = 0x28, has 2 entries:
8 # CHECK-NEXT: Low/High address = [0x201120, 0x201121) (Size: 0x1), CU id = 0
9 # CHECK-NEXT: Low/High address = [0x201121, 0x201123) (Size: 0x2), CU id = 0
11 .section .text.foo1,"ax",@progbits
16 .section .text.foo2,"ax",@progbits
22 .section .debug_abbrev,"",@progbits
23 .byte 1 # Abbreviation Code
24 .byte 17 # DW_TAG_compile_unit
25 .byte 0 # DW_CHILDREN_no
26 .byte 37 # DW_AT_producer
27 .byte 14 # DW_FORM_strp
28 .byte 19 # DW_AT_language
29 .byte 5 # DW_FORM_data2
31 .byte 14 # DW_FORM_strp
32 .byte 16 # DW_AT_stmt_list
33 .byte 23 # DW_FORM_sec_offset
34 .byte 27 # DW_AT_comp_dir
35 .byte 14 # DW_FORM_strp
36 .byte 17 # DW_AT_low_pc
37 .byte 1 # DW_FORM_addr
38 .byte 85 # DW_AT_ranges
39 .byte 23 # DW_FORM_sec_offset
44 .section .debug_info,"",@progbits
46 .long 38 # Length of Unit
47 .short 4 # DWARF version number
48 .long .debug_abbrev # Offset Into Abbrev. Section
49 .byte 8 # Address Size (in bytes)
50 .byte 1 # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
51 .long 0 # DW_AT_producer
52 .short 4 # DW_AT_language
54 .long 0 # DW_AT_stmt_list
55 .long 0 # DW_AT_comp_dir
56 .quad 0 # DW_AT_low_pc
57 .long .Ldebug_ranges0 # DW_AT_ranges
59 .section .debug_ranges,"",@progbits