From 32c1e744c108afe9bebd41766ab3025279878f85 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 14 Mar 2008 18:57:44 +0000 Subject: Async mode fixes. * Makefile.in (infcmd.o, inf-loop.o): Update dependencies. * breakpoint.c (bpstat_do_actions): In async mode, don't jump to top expecting stop_bpstat to be already updated. * event-loop.c (start_event_loop): Call async_enable_stdin on exception. * event-top.c (async_enable_stdin): Do nothing if sync_execution is not set. (command_handler): Do not setup continuation here. (command_line_handler_continuation): Move to... * top.c (command_line_handler_continuation): ... here. (execute_command): In async mode, register continuation. Don't check frame's language in running in async mode. * exceptions.c (throw_exception): Don't do exec_error_cleanups. * inf-loop.c (complete_execution): Inline into... (inferior_event_handler): ... here. Clear target_executing before doing any cleanups. Don't try to show prompt if the target was resumed. * infcmd.c (signal_command): Add support for async mode. (finish_command): Only add continuation if the target was successfully resumed. * remote.c (init_async_opts): Register to_get_thread_local_address handler. * mi/mi-interp.c (mi_cmd_interpreter_exec): Don't mess with sync_execution. * tui/tui-interp.c (tui_command_loop): Call async_enable_stdin on exception. --- gdb/tui/tui-interp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/tui') diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c index ca2e743..8a16678 100644 --- a/gdb/tui/tui-interp.c +++ b/gdb/tui/tui-interp.c @@ -164,6 +164,10 @@ tui_command_loop (void *data) if (result == 0) { + /* If any exception escaped to here, we better enable + stdin. Otherwise, any command that calls async_disable_stdin, + and then throws, will leave stdin inoperable. */ + async_enable_stdin ((void *) 0); /* FIXME: this should really be a call to a hook that is interface specific, because interfaces can display the prompt in their own way. */ -- cgit v1.1