mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-15 20:08:23 +00:00
* linux-fork.c (linux_fork_detach): New.
* linux-fork.h (linux_fork_detach): Declare. * linux-nat.c (linux_child_follow_fork): When following the fork child, add the child inferior before possibly detaching from the parent. Don't reinstall ourselves. (linux_nat_detach): Call linux_fork_detach if there are other forks to debug. * linux-thread-db.c (thread_db_detach): Don't call target_mourn_inferior. Instead inline the necessary bits. * inf-ptrace.c (inf_ptrace_detach): Don't unpush the target if there are other inferiors to debug.
This commit is contained in:
@@ -784,10 +784,15 @@ thread_db_detach (struct target_ops *ops, char *args, int from_tty)
|
||||
{
|
||||
disable_thread_event_reporting ();
|
||||
|
||||
target_beneath->to_detach (target_beneath, args, from_tty);
|
||||
/* Forget about the child's process ID. We shouldn't need it
|
||||
anymore. */
|
||||
proc_handle.pid = 0;
|
||||
|
||||
/* Should this be done by detach_command? */
|
||||
target_mourn_inferior ();
|
||||
/* Detach thread_db target ops. */
|
||||
unpush_target (&thread_db_ops);
|
||||
using_thread_db = 0;
|
||||
|
||||
target_beneath->to_detach (target_beneath, args, from_tty);
|
||||
}
|
||||
|
||||
/* Check if PID is currently stopped at the location of a thread event
|
||||
|
||||
Reference in New Issue
Block a user