From 63eef03aba38e720963067475ff50ec372a099f4 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Fri, 15 Apr 1994 18:43:07 +0000 Subject: * 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. --- gdb/ser-go32.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gdb/ser-go32.c') 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) { -- cgit v1.1