Change ints to bools around thread_info executing/resumed

Switch thread_info::resumed to bool (thread_info::executing already is a bool),
and try to change everything more or less related to that to consistently use
true/false instead of 1/0.

gdb/ChangeLog:

	* fork-child.c (gdb_startup_inferior): Use bool instead of int.
	* gdbthread.h (class thread_info) <resumed>: Likewise.
	* infrun.c (resume_1): Likewise.
	(proceed): Likewise.
	(infrun_thread_stop_requested): Likewise.
	(stop_all_threads): Likewise.
	(handle_inferior_event): Likewise.
	(restart_threads): Likewise.
	(finish_step_over): Likewise.
	(keep_going_stepped_thread): Likewise.
	* linux-nat.c (attach_proc_task_lwp_callback): Likewise.
	(linux_handle_extended_wait): Likewise.
	* record-btrace.c (get_thread_current_frame_id): Likewise.
	* record-full.c (record_full_wait_1): Likewise.
	* remote.c (remote_target::process_initial_stop_replies): Likewise.
	* target.c (target_resume): Likewise.
	* thread.c (set_running_thread): Likewise.
This commit is contained in:
Simon Marchi
2020-02-03 23:02:28 -05:00
committed by Simon Marchi
parent c5d7be0c97
commit 719546c44f
10 changed files with 50 additions and 30 deletions

View File

@@ -1166,8 +1166,8 @@ attach_proc_task_lwp_callback (ptid_t ptid)
matching libthread_db is not found (or the process uses
raw clone). */
add_thread (linux_target, lp->ptid);
set_running (linux_target, lp->ptid, 1);
set_executing (linux_target, lp->ptid, 1);
set_running (linux_target, lp->ptid, true);
set_executing (linux_target, lp->ptid, true);
}
return 1;
@@ -2038,8 +2038,8 @@ linux_handle_extended_wait (struct lwp_info *lp, int status)
internal to this module, from the perspective of infrun
and the user/frontend, this new thread is running until
it next reports a stop. */
set_running (linux_target, new_lp->ptid, 1);
set_executing (linux_target, new_lp->ptid, 1);
set_running (linux_target, new_lp->ptid, true);
set_executing (linux_target, new_lp->ptid, true);
if (WSTOPSIG (status) != SIGSTOP)
{