restore_inferior (void *arg)
{
struct inferior *saved_inferior = arg;
+
set_current_inferior (saved_inferior);
}
{
struct cleanup *old_chain = make_cleanup (restore_inferior,
current_inferior_);
+
return old_chain;
}
exit_inferior (int pid)
{
struct inferior *inf = find_inferior_pid (pid);
+
exit_inferior_1 (inf, 0);
if (print_inferior_events)
exit_inferior_silent (int pid)
{
struct inferior *inf = find_inferior_pid (pid);
+
exit_inferior_1 (inf, 1);
}
detach_inferior (int pid)
{
struct inferior *inf = find_inferior_pid (pid);
+
exit_inferior_1 (inf, 1);
if (print_inferior_events)
/* Compute number of inferiors we will print. */
for (inf = inferior_list; inf; inf = inf->next)
{
- struct cleanup *chain2;
-
if (requested_inferior != -1 && inf->num != requested_inferior)
continue;