diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-02-03 23:02:28 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2020-02-03 23:06:55 -0500 |
commit | 719546c44f5777a3902a2f913c70fd15b942461d (patch) | |
tree | 6f4b7f34edaa5acdba52295cfaec610404bdc2e3 /gdb/gdbthread.h | |
parent | c5d7be0c97a75ff20b49d57bff078360464125fb (diff) | |
download | gdb-719546c44f5777a3902a2f913c70fd15b942461d.zip gdb-719546c44f5777a3902a2f913c70fd15b942461d.tar.gz gdb-719546c44f5777a3902a2f913c70fd15b942461d.tar.bz2 |
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.
Diffstat (limited to 'gdb/gdbthread.h')
-rw-r--r-- | gdb/gdbthread.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index f205e29..717a2ad 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -301,20 +301,20 @@ public: if the thread does not have a user-given name. */ char *name = NULL; - /* Non-zero means the thread is executing. Note: this is different + /* True means the thread is executing. Note: this is different from saying that there is an active target and we are stopped at a breakpoint, for instance. This is a real indicator whether the thread is off and running. */ bool executing = false; - /* Non-zero if this thread is resumed from infrun's perspective. + /* True if this thread is resumed from infrun's perspective. Note that a thread can be marked both as not-executing and resumed at the same time. This happens if we try to resume a thread that has a wait status pending. We shouldn't let the thread really run until that wait status has been processed, but we should not process that wait status if we didn't try to let the thread run. */ - int resumed = 0; + bool resumed = false; /* Frontend view of the thread state. Note that the THREAD_RUNNING/ THREAD_STOPPED states are different from EXECUTING. When the |