if (!inf)
return;
- for (thread_info *tp : inf->threads_safe ())
- delete_thread_silent (tp);
+ for (thread_info *tp : inf->threads ())
+ delete_thread_silent_noremove (tp);
if (infprev)
infprev->next = inf->next;
if (!inf)
return;
- for (thread_info *tp : inf->threads_safe ())
+ for (thread_info *tp : inf->threads ())
{
if (silent)
- delete_thread_silent (tp);
+ delete_thread_silent_noremove (tp);
else
- delete_thread (tp);
+ delete_thread_noremove (tp);
}
+ inf->thread_map.clear ();
+
gdb::observers::inferior_exit.notify (inf);
inf->pid = 0;
gdb::observers::inferior_appeared.notify (inf);
}
-void
-discard_all_inferiors (void)
-{
- for (inferior *inf : all_non_exited_inferiors ())
- exit_inferior_silent (inf);
-}
-
struct inferior *
find_inferior_id (int num)
{
{
if (inf != current_inferior ())
{
- thread_info *tp = any_thread_of_inferior (inf);
+ thread_info *tp = first_thread_of_inferior (inf);
if (tp == NULL)
error (_("Inferior has no threads."));