Re: [PATCH] Avoid potencially-stale errno usage (was: Re: Include putpkt in TRY_CATCH. PR gdb/15275)

Jan Kratochvil
2013-04-08T18:34:42Z

On Mon, 08 Apr 2013 19:57:22 +0200, Pedro Alves wrote:
> @@ -7048,14 +7065,11 @@ readchar (int timeout)
> switch ((enum serial_rc) ch)
> {
> case SERIAL_EOF:
> - remote_unpush_target ();
> - throw_error (TARGET_CLOSE_ERROR, _("Remote connection closed"));
> + unpush_and_perror (_("Remote connection closed"));

I do not see why you have changed this part. I have checked SERIAL_EOF is
returned in cases where errno is not set (errno is unchanged).

Otherwise it looks OK to me.

Thanks,
Jan