/* Multi-process control for GDB, the GNU debugger.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009 Free Software Foundation, Inc.
This file is part of GDB.
#include "gdbcmd.h"
#include "gdbthread.h"
#include "ui-out.h"
+#include "observer.h"
void _initialize_inferiors (void);
inf->next = inferior_list;
inferior_list = inf;
+ observer_notify_new_inferior (pid);
+
return inf;
}
if (!inf)
return;
+ arg.pid = pid;
+ arg.silent = silent;
+
+ iterate_over_threads (delete_thread_of_inferior, &arg);
+
+ /* Notify the observers before removing the inferior from the list,
+ so that the observers have a change to look it up. */
+ observer_notify_inferior_exit (pid);
+
if (infprev)
infprev->next = inf->next;
else
inferior_list = inf->next;
free_inferior (inf);
-
- arg.pid = pid;
- arg.silent = silent;
-
- iterate_over_threads (delete_thread_of_inferior, &arg);
}
void