oursig = gdb_signal_from_command (num);
}
+ do_cleanups (args_chain);
+
/* Look for threads other than the current that this command ends up
resuming too (due to schedlock off), and warn if they'll get a
signal delivered. "signal 0" is used to suppress a previous
{
struct value *func;
- func = read_var_value (a->function, get_current_frame ());
+ func = read_var_value (a->function, NULL, get_current_frame ());
TRY
{
/* print_return_value can throw an exception in some
selected thread is stopped, others may still be executing.
Be sure to explicitly stop all threads of the process. This
should have no effect on already stopped threads. */
- if (non_stop)
+ if (target_is_non_stop_p ())
target_stop (pid_to_ptid (inferior->pid));
/* Tell the user/frontend where we're stopped. */
shouldn't refer to attach_target again. */
attach_target = NULL;
- /* Done with ARGS. */
- do_cleanups (args_chain);
-
/* Set up the "saved terminal modes" of the inferior
based on what modes we are starting it with. */
target_terminal_init ();
init_wait_for_inferior ();
clear_proceed_status (0);
- if (non_stop)
+ if (target_is_non_stop_p ())
{
/* If we find that the current thread isn't stopped, explicitly
do so now, because we're going to install breakpoints and
a->async_exec = async_exec;
add_inferior_continuation (attach_command_continuation, a,
attach_command_continuation_free_args);
+
+ /* Done with ARGS. */
+ do_cleanups (args_chain);
+
return;
}
wait_for_inferior ();
}
+ /* Done with ARGS. */
+ do_cleanups (args_chain);
+
attach_command_post_wait (args, from_tty, async_exec);
}
ptid = minus_one_ptid;
else
ptid = inferior_ptid;
- target_stop (ptid);
+ target_interrupt (ptid);
/* Tag the thread as having been explicitly requested to stop, so
other parts of gdb know not to resume this thread automatically,