aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2020-03-24 13:44:58 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-03-24 13:45:21 -0400
commit5ab2fbf185935f387fd5c1f8b14ba9fe04b41b39 (patch)
tree75106f1f578d4e7a4d21019d7ae517d1c5d6c5bb /gdb/target.c
parente11cd7c491e4ec0cdd080c6dd45e62789a893606 (diff)
downloadbinutils-5ab2fbf185935f387fd5c1f8b14ba9fe04b41b39.zip
binutils-5ab2fbf185935f387fd5c1f8b14ba9fe04b41b39.tar.gz
binutils-5ab2fbf185935f387fd5c1f8b14ba9fe04b41b39.tar.bz2
gdb: bool-ify follow_fork
Change parameters and return value of the various follow_fork functions/methods from int to bool. gdb/ChangeLog: * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int. * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise. * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise. * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise. * infrun.c (follow_fork): Likewise. (follow_fork_inferior): Likewise. * linux-nat.c (linux_nat_target::follow_fork): Likewise. * linux-nat.h (class linux_nat_target): Likewise. * remote.c (class remote_target) <follow_fork>: Likewise. (remote_target::follow_fork): Likewise. * target-delegates.c: Re-generate. * target.c (default_follow_fork): Likewise. (target_follow_fork): Likewise. * target.h (struct target_ops) <follow_fork>: Likewise. (target_follow_fork): Likewise.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 470ef51..1abd8ff 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -66,9 +66,6 @@ static void default_rcmd (struct target_ops *, const char *, struct ui_file *);
static ptid_t default_get_ada_task_ptid (struct target_ops *self,
long lwp, long tid);
-static int default_follow_fork (struct target_ops *self, int follow_child,
- int detach_fork);
-
static void default_mourn_inferior (struct target_ops *self);
static int default_search_memory (struct target_ops *ops,
@@ -2165,9 +2162,9 @@ target_program_signals (gdb::array_view<const unsigned char> program_signals)
current_top_target ()->program_signals (program_signals);
}
-static int
-default_follow_fork (struct target_ops *self, int follow_child,
- int detach_fork)
+static bool
+default_follow_fork (struct target_ops *self, bool follow_child,
+ bool detach_fork)
{
/* Some target returned a fork event, but did not know how to follow it. */
internal_error (__FILE__, __LINE__,
@@ -2177,8 +2174,8 @@ default_follow_fork (struct target_ops *self, int follow_child,
/* Look through the list of possible targets for a target that can
follow forks. */
-int
-target_follow_fork (int follow_child, int detach_fork)
+bool
+target_follow_fork (bool follow_child, bool detach_fork)
{
return current_top_target ()->follow_fork (follow_child, detach_fork);
}