1 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t
2 # RUN: llvm-dwarfdump -debug-names %t | FileCheck %s
4 # CHECK: LocalTU[0]: 0x0000000d
5 # CHECK-NEXT: LocalTU[1]: 0x00000028
6 # CHECK: ForeignTU[0]: 0x0011223344556677
7 # CHECK-NEXT: ForeignTU[1]: 0x1122334455667788
9 .section .debug_abbrev,"",@progbits
10 .byte 1 # Abbreviation Code
11 .byte 17 # DW_TAG_compile_unit
12 .byte 0 # DW_CHILDREN_no
15 .byte 2 # Abbreviation Code
16 .byte 19 # DW_TAG_structure_type
17 .byte 0 # DW_CHILDREN_no
19 .byte 8 # DW_FORM_string
24 .section .debug_names,"",@progbits
25 .long .Lnames_end0-.Lnames_start0 # Header: unit length
27 .short 5 # Header: version
28 .short 0 # Header: padding
29 .long 1 # Header: compilation unit count
30 .long 2 # Header: local type unit count
31 .long 2 # Header: foreign type unit count
32 .long 0 # Header: bucket count
33 .long 2 # Header: name count
34 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
35 .long 0 # Header: augmentation string size
36 .long .Lcu_begin0 # Compilation unit 0
37 .long .Ltu_begin0 # Local TU 0
38 .long .Ltu_begin1 # Local TU 1
39 .quad 0x0011223344556677 # Foreign TU 0
40 .quad 0x1122334455667788 # Foreign TU 1
41 .long .Lstring0 # String in Bucket 0: A
42 .long .Lstring1 # String in Bucket 1: B
43 .long .Lnames0-.Lnames_entries0 # Offset in Bucket 0
44 .long .Lnames1-.Lnames_entries0 # Offset in Bucket 1
46 .Lnames_abbrev_start0:
48 .byte 19 # DW_TAG_structure_type
49 .byte 3 # DW_IDX_die_offset
50 .byte 19 # DW_FORM_ref4
51 .byte 0 # End of abbrev
52 .byte 0 # End of abbrev
53 .byte 0 # End of abbrev list
57 .byte 1 # Abbreviation code
58 .long .Ltu_die0-.Lcu_begin0 # DW_IDX_die_offset
59 .long 0 # End of list: A
61 .byte 1 # Abbreviation code
62 .long .Ltu_die1-.Lcu_begin0 # DW_IDX_die_offset
63 .long 0 # End of list: B
67 .section .debug_info,"",@progbits
69 .long .Lcu_end0-.Lcu_begin0-4 # Length of Unit
70 .short 5 # DWARF version number
71 .byte 1 # DW_UT_compile
72 .byte 8 # Address Size (in bytes)
73 .long .debug_abbrev # Offset Into Abbrev. Section
74 .byte 1 # Abbrev [1] DW_TAG_compile_unit
78 .long .Ltu_end0-.Ltu_begin0-4 # Length of Unit
79 .short 5 # DWARF version number
81 .byte 8 # Address Size (in bytes)
82 .long .debug_abbrev # Offset Into Abbrev. Section
83 .quad 0x0011223344556677 # Type Signature
84 .long .Ltu_die0-.Ltu_begin0 # Type Offset
86 .byte 2 # Abbrev [2] DW_TAG_structure_type
91 .long .Ltu_end1-.Ltu_begin1-4 # Length of Unit
92 .short 5 # DWARF version number
94 .byte 8 # Address Size (in bytes)
95 .long .debug_abbrev # Offset Into Abbrev. Section
96 .quad 0x1122334455667788 # Type Signature
97 .long .Ltu_die1-.Ltu_begin1 # Type Offset
99 .byte 2 # Abbrev [1] 0xc:0x48 DW_TAG_structure_type
103 .section .debug_str,"MS",@progbits,1