aboutsummaryrefslogtreecommitdiff
path: root/gdb/ser-go32.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1994-04-15 18:43:07 +0000
committerSteve Chamberlain <sac@cygnus>1994-04-15 18:43:07 +0000
commit63eef03aba38e720963067475ff50ec372a099f4 (patch)
treee09b5f78d15d590b2168a133b1271d6908e61766 /gdb/ser-go32.c
parent723a8cc5327d0864e37745220c6f0b4160d67ba2 (diff)
downloadgdb-63eef03aba38e720963067475ff50ec372a099f4.zip
gdb-63eef03aba38e720963067475ff50ec372a099f4.tar.gz
gdb-63eef03aba38e720963067475ff50ec372a099f4.tar.bz2
* h8500-tdep.c (initialize_h8500_tdep, large_command):
All references to value changed to value_ptrlage_command is now called big_command. All references to value changed to value_ptr. * remote-z8k.c (e7000_wait): Use target_waitstatus and SETSTOP * remote-hms.c (hms_wait): Timeout after five seconds. * ser-go32.c (dosasync_read): Poll if timeout < 0. * config/tm/tm-h8500.h (BEFORE_MAIN_LOOP_HOOK): Deleted. * config/sh/tm-sh.h (BREAKPOINT): Is now sleep opcode.
Diffstat (limited to 'gdb/ser-go32.c')
-rw-r--r--gdb/ser-go32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c
index 24c55f2..cbfb27f 100644
--- a/gdb/ser-go32.c
+++ b/gdb/ser-go32.c
@@ -160,12 +160,14 @@ dos_async_rx ()
}
rv = *aptr (async->getp++);
+
if (async->getp >= async->buffer_end)
async->getp = async->buffer_start;
return rv;
}
+
static int
dosasync_read (fd, buf, len, timeout)
int fd;
@@ -186,7 +188,7 @@ dosasync_read (fd, buf, len, timeout)
while (!dos_async_ready ())
{
time (&now);
- if (now >= then)
+ if (now >= then && timeout > 0)
return i;
}
}
@@ -258,6 +260,7 @@ go32_readchar (scb, timeout)
{
char buf;
+
/* Shortcut for polling */
if (timeout == 0)
{