From 7309f7566408129b9859af2436c178d85496654a Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 3 Apr 2009 11:23:19 +0000 Subject: [PATCH] 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. --- gdb/testsuite/ChangeLog | 10 ++++++++++ gdb/testsuite/gdb.mi/basics.c | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c9676b889e3..2cf60286bd3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2009-04-03 Vladimir Prus + + 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. + 2009-04-02 Pedro Alves * gdb.server/ext-attach.exp: Expect an optional process id after diff --git a/gdb/testsuite/gdb.mi/basics.c b/gdb/testsuite/gdb.mi/basics.c index 27704d167ae..e6135bce9c9 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); -- 2.30.2