diff options
Diffstat (limited to 'gdb/testsuite/gdb.mi/basics.c')
-rw-r--r-- | gdb/testsuite/gdb.mi/basics.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.mi/basics.c b/gdb/testsuite/gdb.mi/basics.c new file mode 100644 index 0000000..52fe0ed --- /dev/null +++ b/gdb/testsuite/gdb.mi/basics.c @@ -0,0 +1,41 @@ +/* + * This simple program that passes different types of arguments + * on function calls. Useful to test printing frames, stepping, etc. + */ + +callee4 (void) +{ + int A=1; + int B=2; + int C; + + C = A + B; +} + +callee3 (char *strarg) +{ + callee4 (); +} + +callee2 (int intarg, char *strarg) +{ + callee3 (strarg); +} + +callee1 (int intarg, char *strarg, double fltarg) +{ + callee2 (intarg, strarg); +} + +main () +{ + callee1 (2, "A string argument.", 3.5); + callee1 (2, "A string argument.", 3.5); + + printf ("Hello, World!"); + + return 0; +} + + + |