From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Pedro Alves'" <pedro@codesourcery.com>, <gdb-patches@sourceware.org>
Cc: "'Eli Zaretskii'" <eliz@gnu.org>
Subject: [RFA] use gdb_usleep instead of sleep in remote-mips.c (was Missing sleep function for mingw hosts)
Date: Tue, 29 Mar 2011 15:43:00 -0000 [thread overview]
Message-ID: <005301cbee26$42bc8490$c8358db0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <201103291523.46954.pedro@codesourcery.com>
> I have no clue why that `sleep' is necessary, but in any case, can't
> we use already existing `gdb_usleep' function instead and be done
> with it?
Simply because I didn't know that gdb_usleep even existed...
This makes things much easier indeed.
Is the patch below OK?
Pierre
2011-03-29 Pierre Muller <muller@ics.u-strasbg.fr>
Fix mingw compilation with --enable-targets=all.
* remote-mips.c (gdb_usleep.h): Include header.
(mips_enter_debug): Use gdb_usleep instead of sleep.
Index: remote-mips.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-mips.c,v
retrieving revision 1.120
diff -u -p -r1.120 remote-mips.c
--- remote-mips.c 16 Mar 2011 17:59:02 -0000 1.120
+++ remote-mips.c 29 Mar 2011 14:52:12 -0000
@@ -33,6 +33,7 @@
#include "exceptions.h"
#include "gdb_string.h"
#include "gdb_stat.h"
+#include "gdb_usleep.h"
#include "regcache.h"
#include <ctype.h>
#include "mips-tdep.h"
@@ -1350,7 +1351,7 @@ mips_enter_debug (void)
else /* Assume IDT monitor by default. */
mips_send_command ("db tty0\r", 0);
- sleep (1);
+ gdb_usleep (1000000);
serial_write (mips_desc, "\r", sizeof "\r" - 1);
/* We don't need to absorb any spurious characters here, since the
next prev parent reply other threads:[~2011-03-29 15:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 8:11 [RFC] Missing sleep function for mingw hosts Pierre Muller
2011-03-29 13:10 ` Eli Zaretskii
2011-03-29 14:23 ` Pierre Muller
2011-03-29 15:40 ` Pedro Alves
2011-03-29 15:41 ` Kai Tietz
2011-03-29 15:43 ` Pierre Muller [this message]
2011-03-29 15:53 ` [RFA] use gdb_usleep instead of sleep in remote-mips.c (was Missing sleep function for mingw hosts) Joel Brobecker
2011-03-29 16:54 ` Pierre Muller
2011-03-29 22:05 ` [RFC] Missing sleep function for mingw hosts Eli Zaretskii
2011-03-30 0:06 ` Matt Rice
2011-03-30 4:12 ` Eli Zaretskii
2011-03-30 6:25 ` Matt Rice
2011-03-30 9:25 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='005301cbee26$42bc8490$c8358db0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox