OSDN Git Service

Copyright updates for 2007.
[pf3gnuchains/pf3gnuchains3x.git] / gdb / testsuite / gdb.mi / basics.c
1 /* Copyright 1999, 2000, 2004, 2007 Free Software Foundation, Inc.
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
27 int callee4 (void)
28 {
29   int A=1;
30   int B=2;
31   int C;
32
33   C = A + B;
34   return 0;
35 }
36 callee3 (char *strarg)
37 {
38   callee4 ();
39 }
40
41 callee2 (int intarg, char *strarg)
42 {
43   callee3 (strarg);
44 }
45
46 callee1 (int intarg, char *strarg, double fltarg)
47 {
48   callee2 (intarg, strarg);
49 }
50
51 main ()
52 {
53   callee1 (2, "A string argument.", 3.5);
54   callee1 (2, "A string argument.", 3.5);
55
56   printf ("Hello, World!");
57
58   return 0;
59 }
60
61 /*
62 Local variables: 
63 change-log-default-name: "ChangeLog-mi"
64 End: 
65 */
66