This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]