This is the mail archive of the
mailing list for the GDB project.
Re: ser-unix.c:do_unix_readchar() Don't timeout when told not to
- To: Jonathan Larmour <jlarmour at redhat dot co dot uk>
- Subject: Re: ser-unix.c:do_unix_readchar() Don't timeout when told not to
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 28 Mar 2000 18:21:36 +1000
- CC: gdb-patches at sourceware dot cygnus dot com, Alex Schuilenburg <alexs at redhat dot co dot uk>
- Organization: Cygnus Solutions
- References: <38D5D64F.CB756366@redhat.co.uk>
Jonathan Larmour wrote:
> A while back, folks in the eCos team reported that you could get "Watchdog
> has expired. Target detached." messages even when the watchdog wasn't set.
> The GDB team reacted in disbelief :-).
> After getting irritated by it this evening, I looked for and found the
> problem: do_unix_readchar() could still return SERIAL_TIMEOUT, even when the
> requested timeout was -1 (i.e. infinite).
> The attached patch fixes the problem, and I used the opportunity to make the
> code slightly more robust, and more similar to e.g. do_hardwire_readchar in
> the same file.
> I don't have write permission, so please check this in. Thanks,
> 2000-03-20 Jonathan Larmour <email@example.com>
> * ser-unix.c (do_unix_readchar): Reorganise to be more robust,
> particularly ensuring it can't return SERIAL_TIMEOUT when told
> not to time out.
Thanks. I've committed it.