From 3a3e9ee36f308152115225d25b59ac0cc2f35170 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 9 Jul 2008 22:23:05 +0000 Subject: Adjust fork/vfork/exec to pass ptids around. * target.h (struct target_waitstatus): Store related_pid as a ptid. (inferior_has_forked, inferior_has_vforked, inferior_has_execd): Take a ptid_t. * breakpoint.h (struct breakpoint): Change forked_inferior_pid type to ptid. * breakpoint.c (print_it_typical, bpstat_check_location) (print_one_breakpoint_location, set_raw_breakpoint_without_location) (create_fork_vfork_event_catchpoint): Adjust. * infrun.c (fork_event): Change parent_pid and child_pid types to ptid. (follow_exec, inferior_has_forked, inferior_has_vforked) (inferior_has_execd): Take a ptid_t and don't trim it. * linux-thread-db.c (thread_db_wait): Don't trim the returned ptid. * linux-nat.c (linux_child_follow_fork): Adjust. * inf-ptrace.c (inf_ptrace_wait): Adjust. * inf-ttrace.c (inf_ttrace_wait): Adjust. * win32-nat.c (get_win32_debug_event): Don't set related_pid. --- gdb/win32-nat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/win32-nat.c') diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index eb15c97..74df866 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -1302,7 +1302,7 @@ get_win32_debug_event (int pid, struct target_waitstatus *ourstatus) /* Kludge around a Windows bug where first event is a create thread event. Caused when attached process does not have a main thread. */ - retval = ourstatus->value.related_pid = fake_create_process (); + retval = fake_create_process (); if (retval) saw_create++; } @@ -1342,7 +1342,7 @@ get_win32_debug_event (int pid, struct target_waitstatus *ourstatus) /* Add the main thread */ th = win32_add_thread (main_thread_id, current_event.u.CreateProcessInfo.hThread); - retval = ourstatus->value.related_pid = current_event.dwThreadId; + retval = current_event.dwThreadId; break; case EXIT_PROCESS_DEBUG_EVENT: -- cgit v1.1