Use false/true for some inferior class members instead of 0/1
Some class members were changed to bool, but there was still some assignments or comparisons using 0/1. Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
parent
4c35c4c6a7
commit
30220b46d4
11 changed files with 22 additions and 22 deletions
|
@ -234,7 +234,7 @@ memory_xfer_auxv (struct target_ops *ops,
|
|||
this function only when attaching to a process.
|
||||
*/
|
||||
|
||||
if (current_inferior ()->attach_flag != 0)
|
||||
if (current_inferior ()->attach_flag)
|
||||
{
|
||||
enum target_xfer_status ret;
|
||||
|
||||
|
|
|
@ -2037,7 +2037,7 @@ darwin_nat_target::attach (const char *args, int from_tty)
|
|||
|
||||
inf = current_inferior ();
|
||||
inferior_appeared (inf, pid);
|
||||
inf->attach_flag = 1;
|
||||
inf->attach_flag = true;
|
||||
|
||||
darwin_attach_pid (inf);
|
||||
|
||||
|
|
|
@ -2183,7 +2183,7 @@ gnu_nat_target::attach (const char *args, int from_tty)
|
|||
inferior->push_target (this);
|
||||
|
||||
inferior_appeared (inferior, pid);
|
||||
inferior->attach_flag = 1;
|
||||
inferior->attach_flag = true;
|
||||
|
||||
inf_update_procs (inf);
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ inf_ptrace_target::attach (const char *args, int from_tty)
|
|||
#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. */
|
||||
|
|
|
@ -2494,7 +2494,7 @@ setup_inferior (int from_tty)
|
|||
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. */
|
||||
|
@ -2677,7 +2677,7 @@ attach_command (const char *args, int from_tty)
|
|||
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 ())
|
||||
{
|
||||
|
|
|
@ -223,7 +223,7 @@ exit_inferior_1 (struct inferior *inf, int silent)
|
|||
inf->vfork_child = NULL;
|
||||
}
|
||||
|
||||
inf->pending_detach = 0;
|
||||
inf->pending_detach = false;
|
||||
/* Reset it. */
|
||||
inf->control = inferior_control_state (NO_STOP_QUIETLY);
|
||||
|
||||
|
@ -270,7 +270,7 @@ inferior_appeared (struct inferior *inf, int pid)
|
|||
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);
|
||||
|
|
18
gdb/infrun.c
18
gdb/infrun.c
|
@ -495,15 +495,15 @@ holding the child stopped. Try \"set detach-on-fork\" or \
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
@ -585,7 +585,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
@ -647,7 +647,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
|
|||
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;
|
||||
}
|
||||
|
@ -942,7 +942,7 @@ handle_vfork_child_exec_or_exit (int exec)
|
|||
|
||||
/* 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;
|
||||
|
||||
|
@ -998,7 +998,7 @@ handle_vfork_child_exec_or_exit (int exec)
|
|||
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;
|
||||
|
@ -1023,7 +1023,7 @@ handle_vfork_child_exec_or_exit (int exec)
|
|||
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);
|
||||
|
||||
|
@ -5563,7 +5563,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
(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. */
|
||||
|
|
|
@ -706,7 +706,7 @@ nto_procfs_target::attach (const char *args, int from_tty)
|
|||
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);
|
||||
|
@ -1286,7 +1286,7 @@ nto_procfs_target::create_inferior (const char *exec_file,
|
|||
|
||||
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);
|
||||
|
|
|
@ -1849,7 +1849,7 @@ do_attach (ptid_t ptid)
|
|||
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);
|
||||
|
|
|
@ -4625,7 +4625,7 @@ remote_target::process_initial_stop_replies (int from_tty)
|
|||
registers/memory. */
|
||||
for (inferior *inf : all_non_exited_inferiors (this))
|
||||
{
|
||||
inf->needs_setup = 1;
|
||||
inf->needs_setup = true;
|
||||
|
||||
if (non_stop)
|
||||
{
|
||||
|
|
|
@ -2489,7 +2489,7 @@ target_pre_inferior (int from_tty)
|
|||
|
||||
/* 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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue