From 7f9f62ba187205cd123fd2e96909e6d19ad708eb Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 22 Sep 2008 15:16:51 +0000 Subject: * gnu-nat.c (gnu_attach): Add process to inferiors table. (gnu_detach): Remove it. * go32-nat.c (go32_create_inferior): Add process to gdb's inferior table. * inf-ptrace.c (inf_ptrace_follow_fork): Delete and add inferiors to inferior table accordingly. (inf_ptrace_attach): Add new process to inferior table. (inf_ptrace_detach): Remove it. * inf-ttrace.c (inf_ttrace_follow_fork): Delete and add inferiors to inferior table accordingly. (inf_ttrace_attach): Add process to inferior table. (inf_ttrace_detach): Remove it. * linux-fork.c (init_fork_list): Delete any left over inferior. (linux_fork_mourn_inferior, detach_fork_command): Also delete processes from inferior list. * monitor.c (monitor_open): Add process to inferior list. (monitor_close): Remove it. * nto-procfs.c (procfs_attach): Add process to inferior list. Find threads after pushing the target. (procfs_detach): Remove process from inferior list. (procfs_create_inferior): Add process to inferior list. * procfs.c (procfs_detach): Remove process from inferior list. (do_attach): Add process to inferior list. * remote-sim.c (sim_create_inferior): Add process to inferior list. (gdbsim_close): Remove it. * target.c (generic_mourn_inferior): If inferior_ptid is not null_ptid, remove the corresponding inferior from inferior list. * win32-nat.c (do_initial_win32_stuff): Add process to inferior list. (win32_detach): Remove it. * linux-nat.c (linux_child_follow_fork): Delete and add inferiors to inferior list accordingly. * fork-child.c (fork_inferior): Add process to inferior list. * corelow.c (CORELOW_PID): Define. (core_close): Remove core from inferior list. (core_open): Add it. --- gdb/win32-nat.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/win32-nat.c') diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index 0671470..becd3ca 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -1544,6 +1544,8 @@ do_initial_win32_stuff (DWORD pid) clear_proceed_status (); init_wait_for_inferior (); + add_inferior (pid); + terminal_init_inferior_with_pgrp (pid); target_terminal_inferior (); @@ -1756,7 +1758,10 @@ win32_detach (char *args, int from_tty) current_event.dwProcessId); gdb_flush (gdb_stdout); } + inferior_ptid = null_ptid; + detach_inferior (current_event.dwProcessId); + unpush_target (&win32_ops); } -- cgit v1.1