xref: /llvm-project/llvm/test/DebugInfo/X86/dwarfdump-infinite-loop.s (revision 9a1544277e8a9336c98fe8e1f3d6fdde9d2f2bcf)
1# Test object to verify that dwarfdump does not go into infinite recursion due
2# to trying to print fully resolved name.
3# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.o
4# RUN: llvm-dwarfdump --debug-info=0x62 %t.o | FileCheck %s
5
6# CHECK: DW_TAG_formal_parameter
7# CHECK-NEXT: DW_AT_type
8# CHECK-SAME: "t2 *"
9
10# gcc -g -gdwarf-4 -std=gnu++17 -c -gz=none -S reproSmall.cpp -o reproSmall.s
11# struct t1;
12# void f1() {
13#   using t2 = t1;
14#   void (t2::* __fn)();
15# }
16
17.section	.debug_info,"",@progbits
18.Ldebug_info0:
19	.long	0x88
20	.value	0x4
21	.long	.Ldebug_abbrev0
22	.byte	0x8
23	.uleb128 0x1
24	.long	.LASF0
25	.byte	0x4
26	.long	.LASF1
27	.long	.LASF2
28	.quad	0
29	.quad	0
30	.long	.Ldebug_line0
31	.uleb128 0x2
32	.string	"f1"
33	.byte	0x1
34	.byte	0x3
35	.byte	0x6
36	.long	.LASF3
37	.quad	0
38	.quad	0
39	.uleb128 0x1
40	.byte	0x9c
41	.long	0x87
42	.uleb128 0x3
43	.string	"t2"
44	.byte	0x1
45	.byte	0x4
46	.byte	0x9
47	.long	0x87
48	.uleb128 0x4
49	.long	0x62
50	.long	0x6e
51	.uleb128 0x5
52	.long	0x67
53	.uleb128 0x6
54	.byte	0x8
55	.long	0x4e
56	.byte	0
57	.uleb128 0x7
58	.long	0x87
59	.long	0x59
60	.uleb128 0x8
61	.long	.LASF4
62	.byte	0x1
63	.byte	0x5
64	.byte	0xf
65	.long	0x6e
66	.uleb128 0x2
67	.byte	0x91
68	.sleb128 -32
69	.byte	0
70	.uleb128 0x9
71	.string	"t1"
72	.byte	0
73	.section	.debug_abbrev,"",@progbits
74.Ldebug_abbrev0:
75	.uleb128 0x1
76	.uleb128 0x11
77	.byte	0x1
78	.uleb128 0x25
79	.uleb128 0xe
80	.uleb128 0x13
81	.uleb128 0xb
82	.uleb128 0x3
83	.uleb128 0xe
84	.uleb128 0x1b
85	.uleb128 0xe
86	.uleb128 0x11
87	.uleb128 0x1
88	.uleb128 0x12
89	.uleb128 0x7
90	.uleb128 0x10
91	.uleb128 0x17
92	.byte	0
93	.byte	0
94	.uleb128 0x2
95	.uleb128 0x2e
96	.byte	0x1
97	.uleb128 0x3f
98	.uleb128 0x19
99	.uleb128 0x3
100	.uleb128 0x8
101	.uleb128 0x3a
102	.uleb128 0xb
103	.uleb128 0x3b
104	.uleb128 0xb
105	.uleb128 0x39
106	.uleb128 0xb
107	.uleb128 0x6e
108	.uleb128 0xe
109	.uleb128 0x11
110	.uleb128 0x1
111	.uleb128 0x12
112	.uleb128 0x7
113	.uleb128 0x40
114	.uleb128 0x18
115	.uleb128 0x2117
116	.uleb128 0x19
117	.uleb128 0x1
118	.uleb128 0x13
119	.byte	0
120	.byte	0
121	.uleb128 0x3
122	.uleb128 0x16
123	.byte	0
124	.uleb128 0x3
125	.uleb128 0x8
126	.uleb128 0x3a
127	.uleb128 0xb
128	.uleb128 0x3b
129	.uleb128 0xb
130	.uleb128 0x39
131	.uleb128 0xb
132	.uleb128 0x49
133	.uleb128 0x13
134	.byte	0
135	.byte	0
136	.uleb128 0x4
137	.uleb128 0x15
138	.byte	0x1
139	.uleb128 0x64
140	.uleb128 0x13
141	.uleb128 0x1
142	.uleb128 0x13
143	.byte	0
144	.byte	0
145	.uleb128 0x5
146	.uleb128 0x5
147	.byte	0
148	.uleb128 0x49
149	.uleb128 0x13
150	.uleb128 0x34
151	.uleb128 0x19
152	.byte	0
153	.byte	0
154	.uleb128 0x6
155	.uleb128 0xf
156	.byte	0
157	.uleb128 0xb
158	.uleb128 0xb
159	.uleb128 0x49
160	.uleb128 0x13
161	.byte	0
162	.byte	0
163	.uleb128 0x7
164	.uleb128 0x1f
165	.byte	0
166	.uleb128 0x1d
167	.uleb128 0x13
168	.uleb128 0x49
169	.uleb128 0x13
170	.byte	0
171	.byte	0
172	.uleb128 0x8
173	.uleb128 0x34
174	.byte	0
175	.uleb128 0x3
176	.uleb128 0xe
177	.uleb128 0x3a
178	.uleb128 0xb
179	.uleb128 0x3b
180	.uleb128 0xb
181	.uleb128 0x39
182	.uleb128 0xb
183	.uleb128 0x49
184	.uleb128 0x13
185	.uleb128 0x2
186	.uleb128 0x18
187	.byte	0
188	.byte	0
189	.uleb128 0x9
190	.uleb128 0x13
191	.byte	0
192	.uleb128 0x3
193	.uleb128 0x8
194	.uleb128 0x3c
195	.uleb128 0x19
196	.byte	0
197	.byte	0
198	.byte	0
199	.section	.debug_aranges,"",@progbits
200	.long	0x2c
201	.value	0x2
202	.long	.Ldebug_info0
203	.byte	0x8
204	.byte	0
205	.value	0
206	.value	0
207	.quad	0
208	.quad	0
209	.quad	0
210	.quad	0
211	.section	.debug_line,"",@progbits
212.Ldebug_line0:
213	.section	.debug_str,"MS",@progbits,1
214.LASF0:
215	.string	"GNU C++17 11.x -mtune=generic -march=x86-64 -g -gdwarf-4 -gz=none -std=gnu++17"
216.LASF4:
217	.string	"__fn"
218.LASF2:
219	.string	"."
220.LASF1:
221	.string	"reproSmall.cpp"
222.LASF3:
223	.string	"_Z2f1v"
224	.ident	"GCC: (GNU) 11.x"
225