This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Avoid potencially-stale errno usage (was: Re: Include putpkt in TRY_CATCH. PR gdb/15275)
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 8 Apr 2013 20:34:34 +0200
- Subject: Re: [PATCH] Avoid potencially-stale errno usage (was: Re: Include putpkt in TRY_CATCH. PR gdb/15275)
- References: <CAL8qUbrD=fgMP7nE0O8tX=AXifUpQXas25o_4SfK4p79rfoUpw at mail dot gmail dot com> <CAL8qUbqjtBKJFJZ6dPS78Zh8Eb3b33U9JXTmn1pS3Le93xt7Rw at mail dot gmail dot com> <20130325195832 dot GA15218 at host2 dot jankratochvil dot net> <515478BE dot 3030801 at redhat dot com> <51630502 dot 3050109 at redhat dot com>
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