diff options
Diffstat (limited to 'gdb/inferior.c')
-rw-r--r-- | gdb/inferior.c | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c index d0783d3b708..5e98df58942 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -184,11 +184,8 @@ delete_thread_of_inferior (struct thread_info *tp, void *data) return 0; } -/* If SILENT then be quiet -- don't announce a inferior death, or the - exit of its threads. */ - void -delete_inferior_1 (struct inferior *todel, int silent) +delete_inferior (struct inferior *todel) { struct inferior *inf, *infprev; struct delete_thread_of_inferior_arg arg; @@ -203,7 +200,7 @@ delete_inferior_1 (struct inferior *todel, int silent) return; arg.pid = inf->pid; - arg.silent = silent; + arg.silent = 1; iterate_over_threads (delete_thread_of_inferior, &arg); @@ -214,29 +211,13 @@ delete_inferior_1 (struct inferior *todel, int silent) observer_notify_inferior_removed (inf); - free_inferior (inf); -} - -void -delete_inferior (int pid) -{ - struct inferior *inf = find_inferior_pid (pid); - - delete_inferior_1 (inf, 0); - - if (print_inferior_events) - printf_unfiltered (_("[Inferior %d exited]\n"), pid); -} + /* If this program space is rendered useless, remove it. */ + if (program_space_empty_p (inf->pspace)) + delete_program_space (inf->pspace); -void -delete_inferior_silent (int pid) -{ - struct inferior *inf = find_inferior_pid (pid); - - delete_inferior_1 (inf, 1); + free_inferior (inf); } - /* If SILENT then be quiet -- don't announce a inferior exit, or the exit of its threads. */ @@ -509,11 +490,9 @@ prune_inferiors (void) } *ss_link = ss->next; - delete_inferior_1 (ss, 1); + delete_inferior (ss); ss = *ss_link; } - - prune_program_spaces (); } /* Simply returns the count of inferiors. */ @@ -797,10 +776,8 @@ remove_inferior_command (char *args, int from_tty) continue; } - delete_inferior_1 (inf, 1); + delete_inferior (inf); } - - prune_program_spaces (); } struct inferior * |