]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.mi/mi-stack.c
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.mi / mi-stack.c
CommitLineData
6aba47ca 1/* Copyright 1999, 2000, 2004, 2005, 2007 Free Software Foundation, Inc.
8be260b6
DJ
2
3 This file is part of GDB.
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 2 of the License, or (at
8 your option) any later version.
9
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
19
20/*
21 * This simple program that passes different types of arguments
22 * on function calls. Useful to test printing frames, stepping, etc.
23 */
24
25#include <stdio.h>
26
27int callee4 (void)
28{
29 int A=1;
30 int B=2;
31 int C;
32 int D[3] = {0, 1, 2};
33
34 C = A + B;
35 return 0;
36}
37callee3 (char *strarg)
38{
39 callee4 ();
40}
41
42callee2 (int intarg, char *strarg)
43{
44 callee3 (strarg);
45}
46
47callee1 (int intarg, char *strarg, double fltarg)
48{
49 callee2 (intarg, strarg);
50}
51
52main ()
53{
54 callee1 (2, "A string argument.", 3.5);
55 callee1 (2, "A string argument.", 3.5);
56
57 printf ("Hello, World!");
58
59 return 0;
60}
61
62/*
63Local variables:
64change-log-default-name: "ChangeLog-mi"
65End:
66*/
67