| 1 |
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t |
| 2 |
# RUN: llvm-dwarfdump -debug-names %t | FileCheck %s |
| 3 |
|
| 4 |
# CHECK: LocalTU[0]: 0x0000000d |
| 5 |
# CHECK-NEXT: LocalTU[1]: 0x00000028 |
| 6 |
# CHECK: ForeignTU[0]: 0x0011223344556677 |
| 7 |
# CHECK-NEXT: ForeignTU[1]: 0x1122334455667788 |
| 8 |
|
| 9 |
.section .debug_abbrev,"",@progbits |
| 10 |
.byte 1 # Abbreviation Code |
| 11 |
.byte 17 # DW_TAG_compile_unit |
| 12 |
.byte 0 # DW_CHILDREN_no |
| 13 |
.byte 0 # EOM(1) |
| 14 |
.byte 0 # EOM(2) |
| 15 |
.byte 2 # Abbreviation Code |
| 16 |
.byte 19 # DW_TAG_structure_type |
| 17 |
.byte 0 # DW_CHILDREN_no |
| 18 |
.byte 3 # DW_AT_name |
| 19 |
.byte 8 # DW_FORM_string |
| 20 |
.byte 0 # EOM(1) |
| 21 |
.byte 0 # EOM(2) |
| 22 |
.byte 0 |
| 23 |
|
| 24 |
.section .debug_names,"",@progbits |
| 25 |
.long .Lnames_end0-.Lnames_start0 # Header: unit length |
| 26 |
.Lnames_start0: |
| 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 |
| 45 |
|
| 46 |
.Lnames_abbrev_start0: |
| 47 |
.byte 1 # Abbrev code |
| 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 |
| 54 |
.Lnames_abbrev_end0: |
| 55 |
.Lnames_entries0: |
| 56 |
.Lnames0: |
| 57 |
.byte 1 # Abbreviation code |
| 58 |
.long .Ltu_die0-.Lcu_begin0 # DW_IDX_die_offset |
| 59 |
.long 0 # End of list: A |
| 60 |
.Lnames1: |
| 61 |
.byte 1 # Abbreviation code |
| 62 |
.long .Ltu_die1-.Lcu_begin0 # DW_IDX_die_offset |
| 63 |
.long 0 # End of list: B |
| 64 |
.p2align 2 |
| 65 |
.Lnames_end0: |
| 66 |
|
| 67 |
.section .debug_info,"",@progbits |
| 68 |
.Lcu_begin0: |
| 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 |
| 75 |
.Lcu_end0: |
| 76 |
|
| 77 |
.Ltu_begin0: |
| 78 |
.long .Ltu_end0-.Ltu_begin0-4 # Length of Unit |
| 79 |
.short 5 # DWARF version number |
| 80 |
.byte 2 # DW_UT_type |
| 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 |
| 85 |
.Ltu_die0: |
| 86 |
.byte 2 # Abbrev [2] DW_TAG_structure_type |
| 87 |
.asciz "A" |
| 88 |
.Ltu_end0: |
| 89 |
|
| 90 |
.Ltu_begin1: |
| 91 |
.long .Ltu_end1-.Ltu_begin1-4 # Length of Unit |
| 92 |
.short 5 # DWARF version number |
| 93 |
.byte 2 # DW_UT_type |
| 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 |
| 98 |
.Ltu_die1: |
| 99 |
.byte 2 # Abbrev [1] 0xc:0x48 DW_TAG_structure_type |
| 100 |
.asciz "B" |
| 101 |
.Ltu_end1: |
| 102 |
|
| 103 |
.section .debug_str,"MS",@progbits,1 |
| 104 |
.Lstring0: |
| 105 |
.asciz "A" |
| 106 |
.Lstring1: |
| 107 |
.asciz "B" |