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 02/10] remote: Eliminate remote_hostio_close_cleanup


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> +  ~scoped_remote_fd ()
Pedro> +  {
Pedro> +    if (m_fd != -1)
Pedro> +      {
Pedro> +	int remote_errno;
Pedro> +	remote_hostio_close (find_target_at (process_stratum),
Pedro> +			     m_fd, &remote_errno);

The only danger here is if remote_hostio_close can throw.  However, this
was already a danger (in theory) before the patch -- there is a rule
(perhaps unwritten and/or unenforced) that one cannot throw during a
"do_cleanups".

I didn't look but some assurance that this can't happen would be good to
have.

Tom


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