From f107f56344531e3fa4cc74cac1fe7dd7b056edab Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 24 Apr 2008 11:13:44 +0000 Subject: exec_cleanup murder. * breakpoint.c (until_break_command_continuation): Add the 'error' parameter. Directly delete the breakoint as opposed to running cleanups. (until_break_command): Install continuation only after starting the target. Don't use exec cleanups, use ordinary cleanups. Discard cleanups is successfully started the target in async mode. (make_cleanup_delete_breakpoint): Remove. * breakpoint.h (make_cleanup_delete_breakpoint): Remove declaration. * defs.h (do_exec_cleanups, make_exec_cleanup): Remove declarations. (struct continations): Add the 'error' parameter to the continuation_hook field. (add_continuation, do_all_continuations) (add_intermediate_continuation) (do_all_intermediate_continuations): Add the 'error' parameter. * exceptions.c (throw_exception): Don't call do_exec_cleanups. * inf-loop.c (inferior_event_handler): Instead of calling discard_all_continuations, use do_all_continuations with 1 as 'error' parameter. Pass 0 as 'error' parameter in existing uses of discard_all_continuations. * infcmd.c (step_1): Do not use exec cleanup. For async case, discard cleanups. (step_once): Install continuation only after resuming the target. (step_1_continuation): Disable longjmp breakpoint on error. (finish_command_continuation): Add the error parameter. Delete the finish breakpoint directly, do not use cleanups. (finish_command): Do not use exec_cleanups. Always setup continuation. For sync case, immediately run them. (attach_command_continuation): Add the error parameter. * infrun.c (fetch_inferior_event): Do not use exec cleanups to remove step_resume_breakpoint -- adjust delete it directly. * interps.c (interp_set): Adjust call to do_all_continations. * mi/mi-interp.c (mi_interpreter_exec_continuation): Do not do exec cleanups. * mi/mi-main.c (mi_cmd_target_select): Do not do exec cleanups. (mi_cmd_execute): Do not use exec_cleanup. (mi_execute_async_cli_command): Simplify the string concatenation logic. Do no use exec cleanup. (mi_exec_async_cli_cmd_continuation): New parameter error. Free last_async_command. * top.c (command_line_handler_continuation): New parameter error. * utils.c (exec_cleanup_chain, make_exec_cleanup) (do_exec_cleanups): Remove. (add_continuation, do_all_continations) (add_intermediate_continuation) (do_all_intermediate_continuations): New parameter error. --- gdb/inf-loop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gdb/inf-loop.c') diff --git a/gdb/inf-loop.c b/gdb/inf-loop.c index 9519c79..4c61dae 100644 --- a/gdb/inf-loop.c +++ b/gdb/inf-loop.c @@ -50,7 +50,7 @@ inferior_event_handler (enum inferior_event_type event_type, printf_unfiltered (_("error detected from target.\n")); target_async (NULL, 0); pop_target (); - discard_all_continuations (); + do_all_continuations (1); async_enable_stdin (); break; @@ -64,7 +64,7 @@ inferior_event_handler (enum inferior_event_type event_type, { target_async (NULL, 0); pop_target (); - discard_all_continuations (); + do_all_continuations (1); async_enable_stdin (); display_gdb_prompt (0); } @@ -95,9 +95,9 @@ inferior_event_handler (enum inferior_event_type event_type, got interrupted by a breakpoint, still do the pending continuations. The continuation itself is responsible for distinguishing the cases. */ - do_all_intermediate_continuations (); + do_all_intermediate_continuations (0); - do_all_continuations (); + do_all_continuations (0); if (current_language != expected_language) { @@ -126,7 +126,7 @@ inferior_event_handler (enum inferior_event_type event_type, case INF_EXEC_CONTINUE: /* Is there anything left to do for the command issued to complete? */ - do_all_intermediate_continuations (); + do_all_intermediate_continuations (0); break; case INF_QUIT_REQ: -- cgit v1.1