]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.dwarf2/callframecfa.S
add4bf0271b9ad2dc5bb1204429d6d13aa2e6ef0
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / callframecfa.S
1 /*
2 Copyright 2009-2013 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
16
17 /* This was compiled from a trivial program just to test the
18 DW_OP_call_frame_cfa operator:
19
20 int func (int arg) {
21 return arg + 23;
22 }
23
24 int main(int argc, char *argv[]) {
25 func (77);
26 }
27 */
28
29 .file "q.c"
30 .section .debug_abbrev,"",@progbits
31 .Ldebug_abbrev0:
32 .section .debug_info,"",@progbits
33 .Ldebug_info0:
34 .section .debug_line,"",@progbits
35 .Ldebug_line0:
36 .text
37 .Ltext0:
38 .globl func
39 .type func, @function
40 func:
41 .LFB0:
42 .file 1 "q.c"
43 .loc 1 2 0
44 .cfi_startproc
45 pushl %ebp
46 .cfi_def_cfa_offset 8
47 movl %esp, %ebp
48 .cfi_offset 5, -8
49 .cfi_def_cfa_register 5
50 .loc 1 3 0
51 movl 8(%ebp), %eax
52 addl $23, %eax
53 .loc 1 4 0
54 popl %ebp
55 .cfi_restore 5
56 .cfi_def_cfa 4, 4
57 ret
58 .cfi_endproc
59 .LFE0:
60 .size func, .-func
61 .globl _start
62 .type _start, @function
63 _start:
64 .LFB1:
65 .loc 1 6 0
66 .cfi_startproc
67 pushl %ebp
68 .cfi_def_cfa_offset 8
69 movl %esp, %ebp
70 .cfi_offset 5, -8
71 .cfi_def_cfa_register 5
72 subl $4, %esp
73 .loc 1 7 0
74 movl $77, (%esp)
75 call func
76 .loc 1 8 0
77 leave
78 .cfi_restore 5
79 .cfi_def_cfa 4, 4
80 ret
81 .cfi_endproc
82 .LFE1:
83 .size _start, .-_start
84 .Letext0:
85 .section .debug_info
86 .long 0x9e
87 .value 0x3
88 .long .Ldebug_abbrev0
89 .byte 0x4
90 .uleb128 0x1
91 .long .LASF5
92 .byte 0x1
93 .string "q.c"
94 .long .LASF6
95 .long .Ltext0
96 .long .Letext0
97 .long .Ldebug_line0
98 .uleb128 0x2
99 .byte 0x1
100 .long .LASF0
101 .byte 0x1
102 .byte 0x1
103 .byte 0x1
104 .long 0x4f
105 .long .LFB0
106 .long .LFE0
107 .byte 0x1
108 .byte 0x9c
109 .long 0x4f
110 .uleb128 0x3
111 .string "arg"
112 .byte 0x1
113 .byte 0x1
114 .long 0x4f
115 .byte 0x2
116 .byte 0x91
117 .sleb128 0
118 .byte 0x0
119 .uleb128 0x4
120 .byte 0x4
121 .byte 0x5
122 .string "int"
123 .uleb128 0x2
124 .byte 0x1
125 .long .LASF1
126 .byte 0x1
127 .byte 0x6
128 .byte 0x1
129 .long 0x4f
130 .long .LFB1
131 .long .LFE1
132 .byte 0x1
133 .byte 0x9c
134 .long 0x8e
135 .uleb128 0x5
136 .long .LASF2
137 .byte 0x1
138 .byte 0x6
139 .long 0x4f
140 .byte 0x2
141 .byte 0x91
142 .sleb128 0
143 .uleb128 0x5
144 .long .LASF3
145 .byte 0x1
146 .byte 0x6
147 .long 0x8e
148 .byte 0x2
149 .byte 0x91
150 .sleb128 4
151 .byte 0x0
152 .uleb128 0x6
153 .byte 0x4
154 .long 0x94
155 .uleb128 0x6
156 .byte 0x4
157 .long 0x9a
158 .uleb128 0x7
159 .byte 0x1
160 .byte 0x6
161 .long .LASF4
162 .byte 0x0
163 .section .debug_abbrev
164 .uleb128 0x1
165 .uleb128 0x11
166 .byte 0x1
167 .uleb128 0x25
168 .uleb128 0xe
169 .uleb128 0x13
170 .uleb128 0xb
171 .uleb128 0x3
172 .uleb128 0x8
173 .uleb128 0x1b
174 .uleb128 0xe
175 .uleb128 0x11
176 .uleb128 0x1
177 .uleb128 0x12
178 .uleb128 0x1
179 .uleb128 0x10
180 .uleb128 0x6
181 .byte 0x0
182 .byte 0x0
183 .uleb128 0x2
184 .uleb128 0x2e
185 .byte 0x1
186 .uleb128 0x3f
187 .uleb128 0xc
188 .uleb128 0x3
189 .uleb128 0xe
190 .uleb128 0x3a
191 .uleb128 0xb
192 .uleb128 0x3b
193 .uleb128 0xb
194 .uleb128 0x27
195 .uleb128 0xc
196 .uleb128 0x49
197 .uleb128 0x13
198 .uleb128 0x11
199 .uleb128 0x1
200 .uleb128 0x12
201 .uleb128 0x1
202 .uleb128 0x40
203 .uleb128 0xa
204 .uleb128 0x1
205 .uleb128 0x13
206 .byte 0x0
207 .byte 0x0
208 .uleb128 0x3
209 .uleb128 0x5
210 .byte 0x0
211 .uleb128 0x3
212 .uleb128 0x8
213 .uleb128 0x3a
214 .uleb128 0xb
215 .uleb128 0x3b
216 .uleb128 0xb
217 .uleb128 0x49
218 .uleb128 0x13
219 .uleb128 0x2
220 .uleb128 0xa
221 .byte 0x0
222 .byte 0x0
223 .uleb128 0x4
224 .uleb128 0x24
225 .byte 0x0
226 .uleb128 0xb
227 .uleb128 0xb
228 .uleb128 0x3e
229 .uleb128 0xb
230 .uleb128 0x3
231 .uleb128 0x8
232 .byte 0x0
233 .byte 0x0
234 .uleb128 0x5
235 .uleb128 0x5
236 .byte 0x0
237 .uleb128 0x3
238 .uleb128 0xe
239 .uleb128 0x3a
240 .uleb128 0xb
241 .uleb128 0x3b
242 .uleb128 0xb
243 .uleb128 0x49
244 .uleb128 0x13
245 .uleb128 0x2
246 .uleb128 0xa
247 .byte 0x0
248 .byte 0x0
249 .uleb128 0x6
250 .uleb128 0xf
251 .byte 0x0
252 .uleb128 0xb
253 .uleb128 0xb
254 .uleb128 0x49
255 .uleb128 0x13
256 .byte 0x0
257 .byte 0x0
258 .uleb128 0x7
259 .uleb128 0x24
260 .byte 0x0
261 .uleb128 0xb
262 .uleb128 0xb
263 .uleb128 0x3e
264 .uleb128 0xb
265 .uleb128 0x3
266 .uleb128 0xe
267 .byte 0x0
268 .byte 0x0
269 .byte 0x0
270 .section .debug_pubnames,"",@progbits
271 .long 0x20
272 .value 0x2
273 .long .Ldebug_info0
274 .long 0xa2
275 .long 0x25
276 .string "func"
277 .long 0x56
278 .string "main"
279 .long 0x0
280 .section .debug_aranges,"",@progbits
281 .long 0x1c
282 .value 0x2
283 .long .Ldebug_info0
284 .byte 0x4
285 .byte 0x0
286 .value 0x0
287 .value 0x0
288 .long .Ltext0
289 .long .Letext0-.Ltext0
290 .long 0x0
291 .long 0x0
292 .section .debug_str,"MS",@progbits,1
293 .LASF5:
294 .string "GNU C 4.5.0 20090810 (experimental) [trunk revision 150633]"
295 .LASF2:
296 .string "argc"
297 .LASF6:
298 .string "/tmp"
299 .LASF0:
300 .string "func"
301 .LASF3:
302 .string "argv"
303 .LASF1:
304 .string "main"
305 .LASF4:
306 .string "char"
307 .ident "GCC: (GNU) 4.5.0 20090810 (experimental) [trunk revision 150633]"
308 .section .note.GNU-stack,"",@progbits