aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/basics.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2009-04-03 11:23:19 +0000
committerVladimir Prus <vladimir@codesourcery.com>2009-04-03 11:23:19 +0000
commit7309f7566408129b9859af2436c178d85496654a (patch)
tree24879eb93282815f36c8f11c21c128cf680c3e03 /gdb/testsuite/gdb.mi/basics.c
parent6c03179c327ed55f7b870c9043943cd7883114d9 (diff)
downloadgdb-7309f7566408129b9859af2436c178d85496654a.zip
gdb-7309f7566408129b9859af2436c178d85496654a.tar.gz
gdb-7309f7566408129b9859af2436c178d85496654a.tar.bz2
Eliminate some sleep usage.
* gdb.mi/basics.c (do_nothing): New. (main): Use do_nothing instead of printf, so that not to introduce race condition between output of inferiour and output of gdb. Do not use sleep as it is not generally available on embedded targets.
Diffstat (limited to 'gdb/testsuite/gdb.mi/basics.c')
-rw-r--r--gdb/testsuite/gdb.mi/basics.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.mi/basics.c b/gdb/testsuite/gdb.mi/basics.c
index 27704d1..e6135bc 100644
--- a/gdb/testsuite/gdb.mi/basics.c
+++ b/gdb/testsuite/gdb.mi/basics.c
@@ -57,13 +57,16 @@ int return_1 ()
return 1;
}
+void do_nothing (void)
+{
+}
+
main ()
{
callee1 (2, "A string argument.", 3.5);
callee1 (2, "A string argument.", 3.5);
- sleep (1);
- printf ("Hello, World!");
+ do_nothing (); /* Hello, World! */
callme (1);
callme (2);