mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
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) <follow_fork>: 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) <follow_fork>: Likewise. * fbsd-nat.c (fbsd_nat_target::follow_fork): Likewise. * linux-nat.h (class linux_nat_target) <follow_fork>: Likewise. * linux-nat.c (linux_nat_target::follow_fork): Likewise. * obsd-nat.h (class obsd_nat_target) <follow_fork>: Likewise. * obsd-nat.c (obsd_nat_target::follow_fork): Likewise. * remote.c (class remote_target) <follow_fork>: Likewise. * target-debug.h (target_debug_print_target_waitkind): New. * target-delegates.c: Re-generate. Change-Id: I5421a542f2e19100a22b74cc333d2b235d0de3c8
This commit is contained in:
@ -194,17 +194,15 @@ obsd_nat_target::post_startup_inferior (ptid_t pid)
|
||||
the ptid of the followed inferior. */
|
||||
|
||||
void
|
||||
obsd_nat_target::follow_fork (bool follow_child, bool detach_fork)
|
||||
obsd_nat_target::follow_fork (ptid_t child_ptid, target_waitkind fork_kind,
|
||||
bool follow_child, bool detach_fork)
|
||||
{
|
||||
if (!follow_child)
|
||||
{
|
||||
struct thread_info *tp = inferior_thread ();
|
||||
pid_t child_pid = tp->pending_follow.value.related_pid.pid ();
|
||||
|
||||
/* Breakpoints have already been detached from the child by
|
||||
infrun.c. */
|
||||
|
||||
if (ptrace (PT_DETACH, child_pid, (PTRACE_TYPE_ARG3)1, 0) == -1)
|
||||
if (ptrace (PT_DETACH, child_ptid.pid (), (PTRACE_TYPE_ARG3)1, 0) == -1)
|
||||
perror_with_name (("ptrace"));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user