#include "gdbcmd.h"
#include "gdbthread.h"
#include "ui-out.h"
-#include "observer.h"
+#include "observable.h"
#include "gdbcore.h"
#include "symfile.h"
#include "environ.h"
last->next = inf;
}
- observer_notify_inferior_added (inf);
+ gdb::observers::inferior_added.notify (inf);
if (pid != 0)
inferior_appeared (inf, pid);
else
inferior_list = inf->next;
- observer_notify_inferior_removed (inf);
+ gdb::observers::inferior_removed.notify (inf);
/* If this program space is rendered useless, remove it. */
if (program_space_empty_p (inf->pspace))
iterate_over_threads (delete_thread_of_inferior, &arg);
- observer_notify_inferior_exit (inf);
+ gdb::observers::inferior_exit.notify (inf);
inf->pid = 0;
inf->fake_pid_p = 0;
}
inf->pending_detach = 0;
+ /* Reset it. */
+ inf->control = {NO_STOP_QUIETLY};
}
void
inf->has_exit_code = 0;
inf->exit_code = 0;
- observer_notify_inferior_appeared (inf);
+ gdb::observers::inferior_appeared.notify (inf);
}
void
switch_to_thread (tp->ptid);
}
- observer_notify_user_selected_context_changed
+ gdb::observers::user_selected_context_changed.notify
(USER_SELECTED_INFERIOR
| USER_SELECTED_THREAD
| USER_SELECTED_FRAME);
switch_to_thread (null_ptid);
set_current_program_space (inf->pspace);
- observer_notify_user_selected_context_changed (USER_SELECTED_INFERIOR);
+ gdb::observers::user_selected_context_changed.notify
+ (USER_SELECTED_INFERIOR);
}
}
doesn't really return a new address space; otherwise, it
really does. */
aspace = maybe_new_address_space ();
- pspace = add_program_space (aspace);
+ pspace = new program_space (aspace);
inf = add_inferior (0);
inf->pspace = pspace;
inf->aspace = pspace->aspace;
doesn't really return a new address space; otherwise, it
really does. */
aspace = maybe_new_address_space ();
- pspace = add_program_space (aspace);
+ pspace = new program_space (aspace);
inf = add_inferior (0);
inf->pspace = pspace;
inf->aspace = pspace->aspace;