summaryrefslogtreecommitdiff
path: root/gdb/exceptions.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-03-14 18:57:44 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-03-14 18:57:44 +0000
commit9d8942d51a4c7d3f643b84cf68a773492e61f073 (patch)
treeb5e30861a5ebb8f0eb2341a9e34e60eaf2735f11 /gdb/exceptions.c
parente8ec7f8ff59cb2245ad128a731968d949c97f2db (diff)
downloadgdb-9d8942d51a4c7d3f643b84cf68a773492e61f073.tar.gz
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.
Diffstat (limited to 'gdb/exceptions.c')
-rw-r--r--gdb/exceptions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/exceptions.c b/gdb/exceptions.c
index ae30367f9bc..89d14551a57 100644
--- a/gdb/exceptions.c
+++ b/gdb/exceptions.c
@@ -221,10 +221,12 @@ throw_exception (struct gdb_exception exception)
disable_current_display ();
do_cleanups (ALL_CLEANUPS);
+ /* When we implement non-stop mode, this should be redone. If we get
+ exception in a command pertaining to one thread, or maybe even not
+ involving inferior at all, we should not do exec cleanups for all
+ threads. */
if (target_can_async_p () && !target_executing)
do_exec_cleanups (ALL_CLEANUPS);
- if (sync_execution)
- do_exec_error_cleanups (ALL_CLEANUPS);
/* Jump to the containing catch_errors() call, communicating REASON
to that call via setjmp's return value. Note that REASON can't