Update copyright year in most headers.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.mi / basics.c
CommitLineData
4c38e0a4
JB
1/* Copyright 1999, 2000, 2004, 2007, 2008, 2009, 2010
2Free Software Foundation, Inc.
7c27f15b
MC
3
4 This file is part of GDB.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
a9762ec7
JB
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
7c27f15b 10
a9762ec7
JB
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
7c27f15b
MC
15
16 You should have received a copy of the GNU General Public License
a9762ec7 17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
7c27f15b 18
fb40c209
AC
19/*
20 * This simple program that passes different types of arguments
21 * on function calls. Useful to test printing frames, stepping, etc.
22 */
23
5a2e8882 24#include <stdio.h>
6ae37fef 25#include <unistd.h>
5a2e8882 26
19e08fb3 27int callee4 (void)
fb40c209
AC
28{
29 int A=1;
30 int B=2;
31 int C;
32
33 C = A + B;
19e08fb3 34 return 0;
fb40c209 35}
fb40c209
AC
36callee3 (char *strarg)
37{
38 callee4 ();
39}
40
41callee2 (int intarg, char *strarg)
42{
43 callee3 (strarg);
44}
45
46callee1 (int intarg, char *strarg, double fltarg)
47{
48 callee2 (intarg, strarg);
49}
50
60c46647
VP
51void callme (int i)
52{
53 printf ("callme\n");
54}
55
98deb0da
VP
56int return_1 ()
57{
58 return 1;
59}
60
7309f756
VP
61void do_nothing (void)
62{
63}
64
fb40c209
AC
65main ()
66{
67 callee1 (2, "A string argument.", 3.5);
68 callee1 (2, "A string argument.", 3.5);
69
7309f756 70 do_nothing (); /* Hello, World! */
fb40c209 71
60c46647
VP
72 callme (1);
73 callme (2);
74
fb40c209
AC
75 return 0;
76}
This page took 0.940369 seconds and 4 git commands to generate.