ser-unix.c:do_unix_readchar() Don't timeout when told not to
Andrew Cagney
ac131313@cygnus.com
Tue Mar 28 00:23:00 GMT 2000
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,
>
> Jifl
>
> 2000-03-20 Jonathan Larmour <jlarmour@redhat.co.uk>
>
> * 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.
Andrew
More information about the Gdb-patches
mailing list