this function only when attaching to a process.
*/
- if (current_inferior ()->attach_flag != 0)
+ if (current_inferior ()->attach_flag)
{
enum target_xfer_status ret;
inf = current_inferior ();
inferior_appeared (inf, pid);
- inf->attach_flag = 1;
+ inf->attach_flag = true;
darwin_attach_pid (inf);
inferior->push_target (this);
inferior_appeared (inferior, pid);
- inferior->attach_flag = 1;
+ inferior->attach_flag = true;
inf_update_procs (inf);
#endif
inferior_appeared (inf, pid);
- inf->attach_flag = 1;
+ inf->attach_flag = true;
/* Always add a main thread. If some target extends the ptrace
target, it should decorate the ptid later with more info. */
struct inferior *inferior;
inferior = current_inferior ();
- inferior->needs_setup = 0;
+ inferior->needs_setup = false;
/* If no exec file is yet known, try to determine it from the
process itself. */
wait_for_inferior as soon as the target reports a stop. */
init_wait_for_inferior ();
- inferior->needs_setup = 1;
+ inferior->needs_setup = true;
if (target_is_non_stop_p ())
{
inf->vfork_child = NULL;
}
- inf->pending_detach = 0;
+ inf->pending_detach = false;
/* Reset it. */
inf->control = inferior_control_state (NO_STOP_QUIETLY);
init_thread_list ();
inf->pid = pid;
- inf->has_exit_code = 0;
+ inf->has_exit_code = false;
inf->exit_code = 0;
gdb::observers::inferior_appeared.notify (inf);
with the shared region. Keep track of the
parent. */
child_inf->vfork_parent = parent_inf;
- child_inf->pending_detach = 0;
+ child_inf->pending_detach = false;
parent_inf->vfork_child = child_inf;
- parent_inf->pending_detach = 0;
+ parent_inf->pending_detach = false;
}
else
{
child_inf->aspace = new address_space ();
child_inf->pspace = new program_space (child_inf->aspace);
- child_inf->removable = 1;
+ child_inf->removable = true;
clone_program_space (child_inf->pspace, parent_inf->pspace);
}
}
{
child_inf->aspace = new address_space ();
child_inf->pspace = new program_space (child_inf->aspace);
- child_inf->removable = 1;
+ child_inf->removable = true;
child_inf->symfile_flags = SYMFILE_NO_READ;
clone_program_space (child_inf->pspace, parent_inf->pspace);
}
gdb_assert (child_inf->vfork_parent == nullptr);
gdb_assert (parent_inf->vfork_child == nullptr);
child_inf->vfork_parent = parent_inf;
- child_inf->pending_detach = 0;
+ child_inf->pending_detach = false;
parent_inf->vfork_child = child_inf;
parent_inf->pending_detach = detach_fork;
}
/* follow-fork child, detach-on-fork on. */
- vfork_parent->pending_detach = 0;
+ vfork_parent->pending_detach = false;
scoped_restore_current_pspace_and_thread restore_thread;
child a new address space. */
inf->pspace = new program_space (maybe_new_address_space ());
inf->aspace = inf->pspace->aspace;
- inf->removable = 1;
+ inf->removable = true;
set_current_program_space (inf->pspace);
resume_parent = vfork_parent;
inf->pspace = new program_space (maybe_new_address_space ());
inf->aspace = inf->pspace->aspace;
set_current_program_space (inf->pspace);
- inf->removable = 1;
+ inf->removable = true;
inf->symfile_flags = SYMFILE_NO_READ;
clone_program_space (inf->pspace, vfork_parent->pspace);
(LONGEST) ecs->ws.exit_status ());
/* Also record this in the inferior itself. */
- current_inferior ()->has_exit_code = 1;
+ current_inferior ()->has_exit_code = true;
current_inferior ()->exit_code = (LONGEST) ecs->ws.exit_status ();
/* Support the --return-child-result option. */
ptid_t ptid = do_attach (ptid_t (pid));
inf = current_inferior ();
inferior_appeared (inf, pid);
- inf->attach_flag = 1;
+ inf->attach_flag = true;
if (!inf->target_is_pushed (ops))
inf->push_target (ops);
inf = current_inferior ();
inferior_appeared (inf, pid);
- inf->attach_flag = 0;
+ inf->attach_flag = false;
flags = _DEBUG_FLAG_KLC; /* Kill-on-Last-Close flag. */
errn = devctl (ctl_fd, DCMD_PROC_SET_FLAG, &flags, sizeof (flags), 0);
inf = current_inferior ();
inferior_appeared (inf, pi->pid);
/* Let GDB know that the inferior was attached. */
- inf->attach_flag = 1;
+ inf->attach_flag = true;
/* Create a procinfo for the current lwp. */
lwpid = proc_get_current_thread (pi);
registers/memory. */
for (inferior *inf : all_non_exited_inferiors (this))
{
- inf->needs_setup = 1;
+ inf->needs_setup = true;
if (non_stop)
{
/* attach_flag may be set if the previous process associated with
the inferior was attached to. */
- current_inferior ()->attach_flag = 0;
+ current_inferior ()->attach_flag = false;
current_inferior ()->highest_thread_num = 0;