After the previous commit, exit_inferior_1 no longer makes use of the
silent parameter. This commit removes this parameter and cleans up
the callers.
After doing this exit_inferior_1, exit_inferior, and
exit_inferior_silent are all equivalent, so rename exit_inferior_1 to
exit_inferior and delete exit_inferior_silent, update all the callers.
Also I spotted the declaration exit_inferior_num_silent in inferior.h,
but this function is not defined anywhere, so I deleted the
declaration.
There should be no user visible changes after this commit.
bsd_kvm_corefile.clear ();
switch_to_no_thread ();
bsd_kvm_corefile.clear ();
switch_to_no_thread ();
- exit_inferior_silent (current_inferior ());
+ exit_inferior (current_inferior ());
{
switch_to_no_thread (); /* Avoid confusion from thread
stuff. */
{
switch_to_no_thread (); /* Avoid confusion from thread
stuff. */
- exit_inferior_silent (current_inferior ());
+ exit_inferior (current_inferior ());
/* Clear out solib state while the bfd is still open. See
comments in clear_solib in solib.c. */
/* Clear out solib state while the bfd is still open. See
comments in clear_solib in solib.c. */
gdb::observers::inferior_exit.notify (inf);
}
gdb::observers::inferior_exit.notify (inf);
}
-/* If SILENT then be quiet -- don't announce a inferior exit, or the
- exit of its threads. */
-static void
-exit_inferior_1 (struct inferior *inf, int silent)
+void
+exit_inferior (struct inferior *inf)
{
inf->clear_thread_list ();
{
inf->clear_thread_list ();
-void
-exit_inferior (inferior *inf)
-{
- exit_inferior_1 (inf, 0);
-}
-
-void
-exit_inferior_silent (inferior *inf)
-{
- exit_inferior_1 (inf, 1);
-}
-
/* See inferior.h. */
void
detach_inferior (inferior *inf)
{
/* See inferior.h. */
void
detach_inferior (inferior *inf)
{
- /* Save the pid, since exit_inferior_1 will reset it. */
+ /* Save the pid, since exit_inferior will reset it. */
- exit_inferior_1 (inf, 0);
if (print_inferior_events)
gdb_printf (_("[Inferior %d (%s) detached]\n"),
if (print_inferior_events)
gdb_printf (_("[Inferior %d (%s) detached]\n"),
/* Delete an existing inferior list entry, due to inferior detaching. */
extern void detach_inferior (inferior *inf);
/* Delete an existing inferior list entry, due to inferior detaching. */
extern void detach_inferior (inferior *inf);
+/* Notify observers and interpreters that INF has gone away. Reset the INF
+ object back to an default, empty, state. Clear register and frame
+ caches. */
extern void exit_inferior (inferior *inf);
extern void exit_inferior (inferior *inf);
-extern void exit_inferior_silent (inferior *inf);
-
-extern void exit_inferior_num_silent (int num);
-
extern void inferior_appeared (struct inferior *inf, int pid);
/* Search function to lookup an inferior of TARG by target 'pid'. */
extern void inferior_appeared (struct inferior *inf, int pid);
/* Search function to lookup an inferior of TARG by target 'pid'. */
following_inferior = add_inferior_with_spaces ();
swap_terminal_info (following_inferior, execing_inferior);
following_inferior = add_inferior_with_spaces ();
swap_terminal_info (following_inferior, execing_inferior);
- exit_inferior_silent (execing_inferior);
+ exit_inferior (execing_inferior);
following_inferior->pid = pid;
}
following_inferior->pid = pid;
}
trace_dirname.reset ();
switch_to_no_thread (); /* Avoid confusion from thread stuff. */
trace_dirname.reset ();
switch_to_no_thread (); /* Avoid confusion from thread stuff. */
- exit_inferior_silent (current_inferior ());
+ exit_inferior (current_inferior ());
trace_reset_local_state ();
}
trace_reset_local_state ();
}
gdb_assert (trace_fd != -1);
switch_to_no_thread (); /* Avoid confusion from thread stuff. */
gdb_assert (trace_fd != -1);
switch_to_no_thread (); /* Avoid confusion from thread stuff. */
- exit_inferior_silent (current_inferior ());
+ exit_inferior (current_inferior ());
::close (trace_fd);
trace_fd = -1;
::close (trace_fd);
trace_fd = -1;