Commit | Line | Data |
---|---|---|
8be455d7 JK |
1 | /* This testcase is part of GDB, the GNU debugger. |
2 | ||
0b302171 | 3 | Copyright 2011-2012 Free Software Foundation, Inc. |
8be455d7 JK |
4 | |
5 | This program is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 3 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
17 | ||
18 | .section .debug_info | |
19 | .Lcu1_begin: | |
20 | /* CU header */ | |
21 | .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */ | |
22 | .Lcu1_start: | |
23 | .2byte 2 /* DWARF Version */ | |
24 | .4byte .Labbrev1_begin /* Offset into abbrev section */ | |
25 | .byte 4 /* Pointer size */ | |
26 | ||
27 | /* CU die */ | |
28 | .uleb128 1 /* Abbrev: DW_TAG_compile_unit */ | |
29 | .4byte .Lline1_begin /* DW_AT_stmt_list */ | |
30 | .4byte func_start /* DW_AT_low_pc */ | |
31 | .4byte func_end /* DW_AT_high_pc */ | |
32 | .ascii "main.c\0" /* DW_AT_name */ | |
33 | .ascii "GNU C 4.0.0\0" /* DW_AT_producer must be >= 4.0 */ | |
34 | .byte 2 /* DW_AT_language (DW_LANG_C) */ | |
35 | ||
36 | .uleb128 2 /* Abbrev: DW_TAG_subprogram */ | |
37 | .byte 1 /* DW_AT_external */ | |
38 | .ascii "func\0" /* DW_AT_name */ | |
39 | .4byte .Ltype_int-.Lcu1_begin /* DW_AT_type */ | |
40 | .4byte func_start /* DW_AT_low_pc */ | |
41 | .4byte func_end /* DW_AT_high_pc */ | |
42 | ||
43 | /* GDB `has_loclist' detection of -O2 -g code needs to see a DW_AT_location | |
44 | location list. There may exist -O2 -g CUs still not needing/using any such | |
45 | location list - exactly like this CU. Make one up. */ | |
46 | ||
47 | .uleb128 0x7 /* (DIE (0x42) DW_TAG_formal_parameter) */ | |
48 | .ascii "param\0" /* DW_AT_name */ | |
856d06f9 TS |
49 | .4byte .Ltype_int - .Lcu1_begin /* DW_AT_type */ |
50 | .4byte loclist /* DW_AT_location */ | |
8be455d7 JK |
51 | |
52 | .uleb128 4 /* Abbrev: DW_TAG_inlined_subroutine */ | |
53 | .ascii "inlined\0" /* DW_AT_name */ | |
54 | .4byte func0 /* DW_AT_low_pc */ | |
55 | .4byte func1 /* DW_AT_high_pc */ | |
56 | .byte 3 /* DW_AT_inline (DW_INL_declared_inlined) */ | |
57 | .byte 1 /* DW_AT_call_file */ | |
58 | .byte 8 /* DW_AT_call_line */ | |
59 | ||
60 | .uleb128 4 /* Abbrev: DW_TAG_inlined_subroutine */ | |
61 | .ascii "inlined2\0" /* DW_AT_name */ | |
62 | .4byte func2 /* DW_AT_low_pc */ | |
63 | .4byte func3 /* DW_AT_high_pc */ | |
64 | .byte 3 /* DW_AT_inline (DW_INL_declared_inlined) */ | |
65 | .byte 1 /* DW_AT_call_file */ | |
66 | .byte 11 /* DW_AT_call_line */ | |
67 | ||
68 | #ifdef INLINED | |
69 | .uleb128 4 /* Abbrev: DW_TAG_inlined_subroutine */ | |
70 | .ascii "otherinline\0" /* DW_AT_name */ | |
71 | .4byte func3 /* DW_AT_low_pc */ | |
72 | .4byte func_end /* DW_AT_high_pc */ | |
73 | .byte 3 /* DW_AT_inline (DW_INL_declared_inlined) */ | |
74 | .byte 1 /* DW_AT_call_file */ | |
75 | .byte 9 /* DW_AT_call_line */ | |
76 | #endif | |
77 | ||
78 | #ifdef LEXICAL | |
79 | .uleb128 5 /* Abbrev: DW_TAG_lexical_block */ | |
80 | .4byte func3 /* DW_AT_low_pc */ | |
81 | .4byte func_end /* DW_AT_high_pc */ | |
82 | ||
83 | /* GDB would otherwise ignore the DW_TAG_lexical_block. */ | |
84 | .uleb128 6 /* Abbrev: DW_TAG_variable */ | |
85 | .ascii "lexicalvar\0" /* DW_AT_name */ | |
86 | .4byte .Ltype_int-.Lcu1_begin /* DW_AT_type */ | |
87 | ||
88 | .byte 0 /* End of children of DW_TAG_lexical_block */ | |
89 | #endif | |
90 | ||
91 | .byte 0 /* End of children of DW_TAG_subprogram */ | |
92 | ||
93 | /* Simulate `fund' is also named `func' so that the function name matches and | |
94 | fund's SAL is not discarded in expand_line_sal_maybe. */ | |
95 | ||
96 | .uleb128 2 /* Abbrev: DW_TAG_subprogram */ | |
97 | .byte 1 /* DW_AT_external */ | |
98 | .ascii "func\0" /* DW_AT_name */ | |
99 | .4byte .Ltype_int-.Lcu1_begin /* DW_AT_type */ | |
100 | .4byte fund_start /* DW_AT_low_pc */ | |
101 | .4byte fund_end /* DW_AT_high_pc */ | |
102 | ||
103 | .byte 0 /* End of children of DW_TAG_subprogram */ | |
104 | ||
105 | .Ltype_int: | |
106 | .uleb128 3 /* Abbrev: DW_TAG_base_type */ | |
107 | .ascii "int\0" /* DW_AT_name */ | |
108 | .byte 4 /* DW_AT_byte_size */ | |
109 | .byte 5 /* DW_AT_encoding */ | |
110 | ||
111 | .byte 0 /* End of children of CU */ | |
112 | ||
113 | .Lcu1_end: | |
114 | ||
115 | .section .debug_loc | |
116 | loclist: | |
117 | /* Reset the location list base address first. */ | |
856d06f9 | 118 | .4byte -1, 0 |
8be455d7 | 119 | |
856d06f9 | 120 | .4byte func_start, func_end |
8be455d7 JK |
121 | .2byte 2f-1f |
122 | 1: .byte 0x50 /* DW_OP_reg0 */ | |
123 | 2: | |
124 | /* Location list end. */ | |
856d06f9 | 125 | .4byte 0, 0 |
8be455d7 JK |
126 | |
127 | /* Abbrev table */ | |
128 | .section .debug_abbrev | |
129 | .Labbrev1_begin: | |
130 | .uleb128 1 /* Abbrev code */ | |
131 | .uleb128 0x11 /* DW_TAG_compile_unit */ | |
132 | .byte 1 /* has_children */ | |
133 | .uleb128 0x10 /* DW_AT_stmt_list */ | |
134 | .uleb128 0x6 /* DW_FORM_data4 */ | |
135 | .uleb128 0x11 /* DW_AT_low_pc */ | |
136 | .uleb128 0x1 /* DW_FORM_addr */ | |
137 | .uleb128 0x12 /* DW_AT_high_pc */ | |
138 | .uleb128 0x1 /* DW_FORM_addr */ | |
139 | .uleb128 0x3 /* DW_AT_name */ | |
140 | .uleb128 0x8 /* DW_FORM_string */ | |
141 | .uleb128 0x25 /* DW_AT_producer */ | |
142 | .uleb128 0x8 /* DW_FORM_string */ | |
143 | .uleb128 0x13 /* DW_AT_language */ | |
144 | .uleb128 0xb /* DW_FORM_data1 */ | |
145 | .byte 0x0 /* Terminator */ | |
146 | .byte 0x0 /* Terminator */ | |
147 | ||
148 | .uleb128 2 /* Abbrev code */ | |
149 | .uleb128 0x2e /* DW_TAG_subprogram */ | |
150 | .byte 1 /* has_children */ | |
151 | .uleb128 0x3f /* DW_AT_external */ | |
152 | .uleb128 0xc /* DW_FORM_flag */ | |
153 | .uleb128 0x3 /* DW_AT_name */ | |
154 | .uleb128 0x8 /* DW_FORM_string */ | |
155 | .uleb128 0x49 /* DW_AT_type */ | |
156 | .uleb128 0x13 /* DW_FORM_ref4 */ | |
157 | .uleb128 0x11 /* DW_AT_low_pc */ | |
158 | .uleb128 0x1 /* DW_FORM_addr */ | |
159 | .uleb128 0x12 /* DW_AT_high_pc */ | |
160 | .uleb128 0x1 /* DW_FORM_addr */ | |
161 | .byte 0x0 /* Terminator */ | |
162 | .byte 0x0 /* Terminator */ | |
163 | ||
164 | .uleb128 3 /* Abbrev code */ | |
165 | .uleb128 0x24 /* DW_TAG_base_type */ | |
166 | .byte 0 /* has_children */ | |
167 | .uleb128 0x3 /* DW_AT_name */ | |
168 | .uleb128 0x8 /* DW_FORM_string */ | |
169 | .uleb128 0xb /* DW_AT_byte_size */ | |
170 | .uleb128 0xb /* DW_FORM_data1 */ | |
171 | .uleb128 0x3e /* DW_AT_encoding */ | |
172 | .uleb128 0xb /* DW_FORM_data1 */ | |
173 | .byte 0x0 /* Terminator */ | |
174 | .byte 0x0 /* Terminator */ | |
175 | ||
176 | .uleb128 4 /* Abbrev code */ | |
177 | .uleb128 0x1d /* DW_TAG_inlined_subroutine */ | |
178 | .byte 0 /* has_children */ | |
179 | .uleb128 0x3 /* DW_AT_name */ | |
180 | .uleb128 0x8 /* DW_FORM_string */ | |
181 | .uleb128 0x11 /* DW_AT_low_pc */ | |
182 | .uleb128 0x1 /* DW_FORM_addr */ | |
183 | .uleb128 0x12 /* DW_AT_high_pc */ | |
184 | .uleb128 0x1 /* DW_FORM_addr */ | |
185 | .uleb128 0x20 /* DW_AT_inline */ | |
186 | .uleb128 0xb /* DW_FORM_data1 */ | |
187 | .uleb128 0x58 /* DW_AT_call_file */ | |
188 | .uleb128 0xb /* DW_FORM_data1 */ | |
189 | .uleb128 0x59 /* DW_AT_call_line */ | |
190 | .uleb128 0xb /* DW_FORM_data1 */ | |
191 | .byte 0x0 /* Terminator */ | |
192 | .byte 0x0 /* Terminator */ | |
193 | ||
194 | .uleb128 5 /* Abbrev code */ | |
195 | .uleb128 0x0b /* DW_TAG_lexical_block */ | |
196 | .byte 1 /* has_children */ | |
197 | .uleb128 0x11 /* DW_AT_low_pc */ | |
198 | .uleb128 0x1 /* DW_FORM_addr */ | |
199 | .uleb128 0x12 /* DW_AT_high_pc */ | |
200 | .uleb128 0x1 /* DW_FORM_addr */ | |
201 | .byte 0x0 /* Terminator */ | |
202 | .byte 0x0 /* Terminator */ | |
203 | ||
204 | .uleb128 6 /* Abbrev code */ | |
205 | .uleb128 0x34 /* DW_TAG_variable */ | |
206 | .byte 0 /* has_children */ | |
207 | .uleb128 0x3 /* DW_AT_name */ | |
208 | .uleb128 0x8 /* DW_FORM_string */ | |
209 | .uleb128 0x49 /* DW_AT_type */ | |
210 | .uleb128 0x13 /* DW_FORM_ref4 */ | |
211 | .byte 0x0 /* Terminator */ | |
212 | .byte 0x0 /* Terminator */ | |
213 | ||
214 | .uleb128 0x7 /* (abbrev code) */ | |
215 | .uleb128 0x5 /* (TAG: DW_TAG_formal_parameter) */ | |
216 | .byte 0x0 /* DW_children_no */ | |
217 | .uleb128 0x3 /* DW_AT_name */ | |
218 | .uleb128 0x8 /* DW_FORM_string */ | |
219 | .uleb128 0x49 /* (DW_AT_type) */ | |
220 | .uleb128 0x13 /* (DW_FORM_ref4) */ | |
221 | .uleb128 0x02 /* (DW_AT_location) */ | |
222 | .uleb128 0x06 /* (DW_FORM_data4) */ | |
223 | .byte 0x0 | |
224 | .byte 0x0 | |
225 | ||
226 | .byte 0x0 /* Terminator */ | |
227 | .byte 0x0 /* Terminator */ | |
228 | ||
229 | /* Line table */ | |
230 | .section .debug_line | |
231 | .Lline1_begin: | |
232 | .4byte .Lline1_end - .Lline1_start /* Initial length */ | |
233 | .Lline1_start: | |
234 | .2byte 2 /* Version */ | |
235 | .4byte .Lline1_lines - .Lline1_hdr /* header_length */ | |
236 | .Lline1_hdr: | |
237 | .byte 1 /* Minimum insn length */ | |
238 | .byte 1 /* default_is_stmt */ | |
239 | .byte 1 /* line_base */ | |
240 | .byte 1 /* line_range */ | |
241 | .byte 0x10 /* opcode_base */ | |
242 | ||
243 | /* Standard lengths */ | |
244 | .byte 0 | |
245 | .byte 1 | |
246 | .byte 1 | |
247 | .byte 1 | |
248 | .byte 1 | |
249 | .byte 0 | |
250 | .byte 0 | |
251 | .byte 0 | |
252 | .byte 1 | |
253 | .byte 0 | |
254 | .byte 0 | |
255 | .byte 1 | |
256 | .byte 0 | |
257 | .byte 0 | |
258 | .byte 0 | |
259 | ||
260 | /* Include directories */ | |
261 | .byte 0 | |
262 | ||
263 | /* File names */ | |
264 | .ascii "main.c\0" | |
265 | .uleb128 0 | |
266 | .uleb128 0 | |
267 | .uleb128 0 | |
268 | ||
269 | .ascii "other.c\0" | |
270 | .uleb128 0 | |
271 | .uleb128 0 | |
272 | .uleb128 0 | |
273 | ||
274 | .byte 0 | |
275 | ||
276 | .Lline1_lines: | |
277 | .byte 0 /* DW_LNE_set_address */ | |
278 | .uleb128 5 | |
279 | .byte 2 | |
280 | .4byte func_start | |
281 | .byte 3 /* DW_LNS_advance_line */ | |
282 | .sleb128 4 /* ... to 5 */ | |
283 | .byte 1 /* DW_LNS_copy */ | |
284 | ||
285 | .byte 0 /* DW_LNE_set_address */ | |
286 | .uleb128 5 | |
287 | .byte 2 | |
288 | .4byte func0 | |
289 | .byte 4 /* DW_LNS_set_file */ | |
290 | .uleb128 2 | |
291 | .byte 3 /* DW_LNS_advance_line */ | |
292 | .sleb128 -4 /* ... to 1 */ | |
293 | .byte 1 /* DW_LNS_copy */ | |
294 | ||
295 | .byte 0 /* DW_LNE_set_address */ | |
296 | .uleb128 5 | |
297 | .byte 2 | |
298 | .4byte func1 | |
299 | .byte 4 /* DW_LNS_set_file */ | |
300 | .uleb128 1 | |
301 | .byte 3 /* DW_LNS_advance_line */ | |
302 | .sleb128 8 /* ... to 9 */ | |
303 | .byte 1 /* DW_LNS_copy */ | |
304 | ||
305 | .byte 0 /* DW_LNE_set_address */ | |
306 | .uleb128 5 | |
307 | .byte 2 | |
308 | .4byte func2 | |
309 | .byte 4 /* DW_LNS_set_file */ | |
310 | .uleb128 2 | |
311 | .byte 3 /* DW_LNS_advance_line */ | |
312 | .sleb128 -8 /* ... to 1 */ | |
313 | .byte 1 /* DW_LNS_copy */ | |
314 | ||
315 | .byte 0 /* DW_LNE_set_address */ | |
316 | .uleb128 5 | |
317 | .byte 2 | |
318 | .4byte func3 | |
319 | .byte 4 /* DW_LNS_set_file */ | |
320 | .uleb128 1 | |
321 | .byte 3 /* DW_LNS_advance_line */ | |
322 | .sleb128 8 /* ... to 9 */ | |
323 | .byte 1 /* DW_LNS_copy */ | |
324 | ||
325 | .byte 0 /* DW_LNE_set_address */ | |
326 | .uleb128 5 | |
327 | .byte 2 | |
328 | .4byte func_end | |
329 | ||
330 | /* Equivalent copy but renamed s/func/fund/. */ | |
331 | ||
332 | .byte 0 /* DW_LNE_set_address */ | |
333 | .uleb128 5 | |
334 | .byte 2 | |
335 | .4byte fund_start | |
336 | .byte 3 /* DW_LNS_advance_line */ | |
337 | .sleb128 -4 /* ... to 5 */ | |
338 | .byte 1 /* DW_LNS_copy */ | |
339 | ||
340 | .byte 0 /* DW_LNE_set_address */ | |
341 | .uleb128 5 | |
342 | .byte 2 | |
343 | .4byte fund0 | |
344 | .byte 4 /* DW_LNS_set_file */ | |
345 | .uleb128 2 | |
346 | .byte 3 /* DW_LNS_advance_line */ | |
347 | .sleb128 -4 /* ... to 1 */ | |
348 | .byte 1 /* DW_LNS_copy */ | |
349 | ||
350 | .byte 0 /* DW_LNE_set_address */ | |
351 | .uleb128 5 | |
352 | .byte 2 | |
353 | .4byte fund1 | |
354 | .byte 4 /* DW_LNS_set_file */ | |
355 | .uleb128 1 | |
356 | .byte 3 /* DW_LNS_advance_line */ | |
357 | .sleb128 8 /* ... to 9 */ | |
358 | .byte 1 /* DW_LNS_copy */ | |
359 | ||
360 | .byte 0 /* DW_LNE_set_address */ | |
361 | .uleb128 5 | |
362 | .byte 2 | |
363 | .4byte fund2 | |
364 | .byte 4 /* DW_LNS_set_file */ | |
365 | .uleb128 2 | |
366 | .byte 3 /* DW_LNS_advance_line */ | |
367 | .sleb128 -8 /* ... to 1 */ | |
368 | .byte 1 /* DW_LNS_copy */ | |
369 | ||
370 | .byte 0 /* DW_LNE_set_address */ | |
371 | .uleb128 5 | |
372 | .byte 2 | |
373 | .4byte fund3 | |
374 | .byte 4 /* DW_LNS_set_file */ | |
375 | .uleb128 1 | |
376 | .byte 3 /* DW_LNS_advance_line */ | |
377 | .sleb128 8 /* ... to 9 */ | |
378 | .byte 1 /* DW_LNS_copy */ | |
379 | ||
380 | .byte 0 /* DW_LNE_set_address */ | |
381 | .uleb128 5 | |
382 | .byte 2 | |
383 | .4byte fund_end | |
384 | ||
385 | /* Line numbering end. */ | |
386 | ||
387 | .byte 0 /* DW_LNE_end_of_sequence */ | |
388 | .uleb128 1 | |
389 | .byte 1 | |
390 | ||
391 | .Lline1_end: |