From 3a849a3454a53684ca3d679697adb1bfb56596cc Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 31 May 2021 13:00:32 -0400 Subject: gdb: pass child_ptid and fork kind to target_ops::follow_fork This is a small cleanup I think would be nice, that I spotted while doing the following patch. gdb/ChangeLog: * target.h (struct target_ops) : Add ptid and target_waitkind parameters. (target_follow_fork): Likewise. * target.c (default_follow_fork): Likewise. (target_follow_fork): Likewise. * fbsd-nat.h (class fbsd_nat_target) : Likewise. * fbsd-nat.c (fbsd_nat_target::follow_fork): Likewise. * linux-nat.h (class linux_nat_target) : Likewise. * linux-nat.c (linux_nat_target::follow_fork): Likewise. * obsd-nat.h (class obsd_nat_target) : Likewise. * obsd-nat.c (obsd_nat_target::follow_fork): Likewise. * remote.c (class remote_target) : Likewise. * target-debug.h (target_debug_print_target_waitkind): New. * target-delegates.c: Re-generate. Change-Id: I5421a542f2e19100a22b74cc333d2b235d0de3c8 --- gdb/target.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gdb/target.c') diff --git a/gdb/target.c b/gdb/target.c index 7875289..b0f3e88 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -2701,7 +2701,8 @@ target_program_signals (gdb::array_view program_signals) } static void -default_follow_fork (struct target_ops *self, bool follow_child, +default_follow_fork (struct target_ops *self, ptid_t child_ptid, + target_waitkind fork_kind, bool follow_child, bool detach_fork) { /* Some target returned a fork event, but did not know how to follow it. */ @@ -2712,11 +2713,12 @@ default_follow_fork (struct target_ops *self, bool follow_child, /* See target.h. */ void -target_follow_fork (bool follow_child, bool detach_fork) +target_follow_fork (ptid_t child_ptid, target_waitkind fork_kind, + bool follow_child, bool detach_fork) { target_ops *target = current_inferior ()->top_target (); - return target->follow_fork (follow_child, detach_fork); + return target->follow_fork (child_ptid, fork_kind, follow_child, detach_fork); } /* See target.h. */ -- cgit v1.1