[Instrumentation] Fix a warning
[llvm-project.git] / llvm / test / tools / llvm-dwarfdump / X86 / debug-names-misaligned.s
blob0ad4f50e98d988f59f9b0d911b45b00b67d7a66c
1 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj -o - | llvm-dwarfdump -debug-names - | FileCheck %s
2 .section .debug_str,"MS",@progbits,1
3 .Linfo_string0:
4 .asciz "foo"
5 .Linfo_string1:
6 .asciz "bar"
8 # Fake .debug_info. We just need it for the offsets to two "compile units" and
9 # two "DIEs"
10 .section .debug_info,"",@progbits
11 .Lcu_begin0:
12 .byte 0
13 .Ldie0:
14 .byte 0
15 .Lcu_begin1:
16 .byte 0
17 .Ldie1:
18 .byte 0
20 .section .debug_names,"",@progbits
21 .long .Lnames_end0-.Lnames_start0 # Header: contribution length
22 .Lnames_start0:
23 .short 5 # Header: version
24 .short 0 # Header: padding
25 .long 1 # Header: compilation unit count
26 .long 0 # Header: local type unit count
27 .long 0 # Header: foreign type unit count
28 .long 0 # Header: bucket count
29 .long 1 # Header: name count
30 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
31 .long 0 # Header: augmentation length
32 .long .Lcu_begin0 # Compilation unit 0
33 .long .Linfo_string0 # String 1: foo
34 .long .Lnames0-.Lnames_entries0 # Offset 1
35 .Lnames_abbrev_start0:
36 .byte 46 # Abbrev code
37 .byte 46 # DW_TAG_subprogram
38 .byte 3 # DW_IDX_die_offset
39 .byte 19 # DW_FORM_ref4
40 .byte 0 # End of abbrev
41 .byte 0 # End of abbrev
42 .byte 0 # End of abbrev list
43 .Lnames_abbrev_end0:
44 .Lnames_entries0:
45 .Lnames0:
46 .byte 46 # Abbrev code
47 .long .Ldie0-.Lcu_begin0 # DW_IDX_die_offset
48 .long 0 # End of list: foo
49 .p2align 2
50 .byte 42 # Deliberately misalign the next contribution
51 .Lnames_end0:
53 .long .Lnames_end1-.Lnames_start1 # Header: contribution length
54 .Lnames_start1:
55 .short 5 # Header: version
56 .short 0 # Header: padding
57 .long 1 # Header: compilation unit count
58 .long 0 # Header: local type unit count
59 .long 0 # Header: foreign type unit count
60 .long 0 # Header: bucket count
61 .long 1 # Header: name count
62 .long .Lnames_abbrev_end1-.Lnames_abbrev_start1 # Header: abbreviation table size
63 .long 0 # Header: augmentation length
64 .long .Lcu_begin1 # Compilation unit 0
65 .long .Linfo_string1 # String 1: bar
66 .long .Lnames1-.Lnames_entries1 # Offset 1
67 .Lnames_abbrev_start1:
68 .byte 52 # Abbrev code
69 .byte 52 # DW_TAG_variable
70 .byte 3 # DW_IDX_die_offset
71 .byte 19 # DW_FORM_ref4
72 .byte 0 # End of abbrev
73 .byte 0 # End of abbrev
74 .byte 0 # End of abbrev list
75 .Lnames_abbrev_end1:
76 .Lnames_entries1:
77 .Lnames1:
78 .byte 52 # Abbrev code
79 .long .Ldie1-.Lcu_begin1 # DW_IDX_die_offset
80 .long 0 # End of list: bar
81 .p2align 2
82 .Lnames_end1:
83 # CHECK: Name Index @ 0x0
84 # CHECK: Name 1 {
85 # CHECK-NEXT: String: 0x00000000 "foo"
86 # CHECK-NEXT: Entry @ 0x37 {
87 # CHECK-NEXT: Abbrev: 0x2e
88 # CHECK-NEXT: Tag: DW_TAG_subprogram
89 # CHECK-NEXT: DW_IDX_die_offset: 0x00000001
90 # CHECK-NEXT: }
91 # CHECK-NEXT: }
93 # CHECK: Name Index @ 0x41
94 # CHECK: Name 1 {
95 # CHECK-NEXT: String: 0x00000004 "bar"
96 # CHECK-NEXT: Entry @ 0x78 {
97 # CHECK-NEXT: Abbrev: 0x34
98 # CHECK-NEXT: Tag: DW_TAG_variable
99 # CHECK-NEXT: DW_IDX_die_offset: 0x00000001
100 # CHECK-NEXT: }
101 # CHECK-NEXT: }