Notification for attach/detach.

* inferior.c: Call the process observers.
        * mi/mi-interp.c (mi_new_inferior, mi_inferior_exit): New.
        (mi_interpreter_init): Register the above.
This commit is contained in:
Vladimir Prus
2008-11-17 12:28:05 +00:00
parent 3ee1c036ac
commit 4a92f99bc7
5 changed files with 51 additions and 0 deletions

View File

@@ -24,6 +24,7 @@
#include "gdbcmd.h"
#include "gdbthread.h"
#include "ui-out.h"
#include "observer.h"
void _initialize_inferiors (void);
@@ -91,6 +92,8 @@ add_inferior (int pid)
{
struct inferior *inf = add_inferior_silent (pid);
observer_notify_new_inferior (pid);
if (print_inferior_events)
printf_unfiltered (_("[New inferior %d]\n"), pid);
@@ -147,6 +150,8 @@ delete_inferior_1 (int pid, int silent)
arg.silent = silent;
iterate_over_threads (delete_thread_of_inferior, &arg);
observer_notify_inferior_exit (pid);
}
void