diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-12-01 09:40:02 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2021-12-08 21:00:39 -0500 |
commit | 28561a655942f8e2a70a3b64e867223a60aae7b1 (patch) | |
tree | ef00a04a38f8a5ef566bb331578d69ce87b04f01 /sim/m32c | |
parent | a4543480c5e7879955c57e20ab4e8935961153b5 (diff) | |
download | binutils-28561a655942f8e2a70a3b64e867223a60aae7b1.zip binutils-28561a655942f8e2a70a3b64e867223a60aae7b1.tar.gz binutils-28561a655942f8e2a70a3b64e867223a60aae7b1.tar.bz2 |
gdb/remote.c: refactor pending fork status functions
In preparation for a following patch, refactor a few things that I did
find a bit awkward, and to make them a bit more reusable.
- Pass an inferior to kill_new_fork_children instead of a pid. That
allows iterating on only this inferior's threads and avoid further
filtering on the thread's pid.
- Change thread_pending_fork_status to return a non-nullptr value only
if the thread does have a pending fork status.
- Remove is_pending_fork_parent_thread, as one can just use
thread_pending_fork_status and check for nullptr.
- Replace is_pending_fork_parent with is_fork_status, which just
returns if the given target_waitkind if a fork or a vfork. Push
filtering on the pid to the callers, when it is necessary.
Change-Id: I0764ccc684d40f054e39df6fa5458cc4c5d1cd7b
Diffstat (limited to 'sim/m32c')
0 files changed, 0 insertions, 0 deletions