diff options
Diffstat (limited to 'gdb/testsuite/gdb.multi')
-rw-r--r-- | gdb/testsuite/gdb.multi/goodbye.c | 28 | ||||
-rw-r--r-- | gdb/testsuite/gdb.multi/hangout.c | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.multi/hello.c | 7 |
3 files changed, 22 insertions, 14 deletions
diff --git a/gdb/testsuite/gdb.multi/goodbye.c b/gdb/testsuite/gdb.multi/goodbye.c index 701e504..bf7759a 100644 --- a/gdb/testsuite/gdb.multi/goodbye.c +++ b/gdb/testsuite/gdb.multi/goodbye.c @@ -39,24 +39,28 @@ int verylongfun() glob *= 9; } -main() { - mailand(); - foo(glob); - verylongfun(); - goodbye(); -} - -foo(int x) { - return x + 92; -} - +void mailand() { glob = 46; } -void commonfun() { mailand(); } /* from goodbye */ +int +foo(int x) { + return x + 92; +} +void goodbye() { ++glob; } + +int +main() { + mailand(); + foo(glob); + verylongfun(); + goodbye(); +} + +void commonfun() { mailand(); } /* from goodbye */ diff --git a/gdb/testsuite/gdb.multi/hangout.c b/gdb/testsuite/gdb.multi/hangout.c index e2c41b8..3701512 100644 --- a/gdb/testsuite/gdb.multi/hangout.c +++ b/gdb/testsuite/gdb.multi/hangout.c @@ -17,6 +17,7 @@ #include <stdio.h> +int main(int argc, char *argv[]) { int i; diff --git a/gdb/testsuite/gdb.multi/hello.c b/gdb/testsuite/gdb.multi/hello.c index efff59d..93d921f 100644 --- a/gdb/testsuite/gdb.multi/hello.c +++ b/gdb/testsuite/gdb.multi/hello.c @@ -21,20 +21,23 @@ short hglob = 1; short glob = 92; -int commonfun() { bar(); } /* from hello */ - +void bar() { if (glob == 0) exit(1); } +int commonfun() { bar(); } /* from hello */ + +int hello(int x) { x *= 2; return x + 45; } +int main() { int tmpx; |