struct inferior *inferior_list = NULL;
static int highest_inferior_num;
-/* Print notices on inferior events (attach, detach, etc.), set with
- `set print inferior-events'. */
-static int print_inferior_events = 0;
+/* See inferior.h. */
+int print_inferior_events = 1;
/* The Current Inferior. This is a strong reference. I.e., whenever
an inferior is the current inferior, its refcount is
struct inferior *inf = add_inferior_silent (pid);
if (print_inferior_events)
- printf_unfiltered (_("[New inferior %d]\n"), pid);
+ printf_unfiltered (_("[New inferior %d (%s)]\n"),
+ inf->num,
+ target_pid_to_str (pid_to_ptid (pid)));
return inf;
}
struct inferior *inf = find_inferior_pid (pid);
exit_inferior_1 (inf, 0);
-
- if (print_inferior_events)
- printf_unfiltered (_("[Inferior %d exited]\n"), pid);
}
void
exit_inferior_1 (inf, 0);
if (print_inferior_events)
- printf_unfiltered (_("[Inferior %d detached]\n"), pid);
+ printf_unfiltered (_("[Inferior %d (%s) detached]\n"),
+ inf->num,
+ target_pid_to_str (pid_to_ptid (pid)));
}
/* See inferior.h. */
can only allocate an inferior when all those modules have done
that. Do this after initialize_progspace, due to the
current_program_space reference. */
- current_inferior_ = add_inferior (0);
+ current_inferior_ = add_inferior_silent (0);
current_inferior_->incref ();
current_inferior_->pspace = current_program_space;
current_inferior_->aspace = current_program_space->aspace;