+2008-11-03 Vladimir Prus <vladimir@codesourcery.com>
+
+ Make attach_command exception-safe
+ * infcmd.c (attach_command): Call async_enable_stdin
+ if exception is thrown.
+
2008-11-03 Pedro Alves <pedro@codesourcery.com>
* gdbarch.sh (has_global_solist): Mention global breakpoints.
char *exec_file;
char *full_exec_path = NULL;
int async_exec = 0;
+ struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
dont_repeat (); /* Not for the faint of heart */
{
/* Simulate synchronous execution */
async_disable_stdin ();
+ make_cleanup ((make_cleanup_ftype *)async_enable_stdin, NULL);
}
target_attach (args, from_tty);
add_continuation (inferior_thread (),
attach_command_continuation, a,
attach_command_continuation_free_args);
+ discard_cleanups (back_to);
return;
}
}
attach_command_post_wait (args, from_tty, async_exec);
+ discard_cleanups (back_to);
}
/*