2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
3 # RUN: ld.lld --gdb-index %t1.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 = [0x201123, 0x201126) (Size: 0x3), CU id = 0
26 .section .debug_abbrev,"",@progbits
27 .byte 1 # Abbreviation Code
28 .byte 17 # DW_TAG_compile_unit
29 .byte 0 # DW_CHILDREN_no
30 .byte 37 # DW_AT_producer
31 .byte 14 # DW_FORM_strp
32 .byte 19 # DW_AT_language
33 .byte 5 # DW_FORM_data2
35 .byte 14 # DW_FORM_strp
36 .byte 16 # DW_AT_stmt_list
37 .byte 23 # DW_FORM_sec_offset
38 .byte 27 # DW_AT_comp_dir
39 .byte 14 # DW_FORM_strp
40 .byte 17 # DW_AT_low_pc
41 .byte 1 # DW_FORM_addr
42 .byte 85 # DW_AT_ranges
43 .byte 23 # DW_FORM_sec_offset
48 .section .debug_info,"",@progbits
50 .long 38 # Length of Unit
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:0x1f DW_TAG_compile_unit
55 .long 0 # DW_AT_producer
56 .short 4 # DW_AT_language
58 .long 0 # DW_AT_stmt_list
59 .long 0 # DW_AT_comp_dir
60 .quad .Lfunc_begin0 # DW_AT_low_pc
61 .long .Ldebug_ranges0 # DW_AT_ranges
63 .section .debug_ranges,"",@progbits
65 .quad .Lfunc_begin0-.Lfunc_begin0
66 .quad .Ltmp0-.Lfunc_begin0
67 .quad .Ltmp1-.Lfunc_begin0
68 .quad .Ltmp2-.Lfunc_begin0