aboutsummaryrefslogtreecommitdiff
path: root/gdb/gnu-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gnu-nat.c')
-rw-r--r--gdb/gnu-nat.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 8bee815..78e9ab7 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -85,6 +85,8 @@ extern "C"
#include "msg_U.h"
}
+struct gnu_nat_target *gnu_target;
+
static process_t proc_server = MACH_PORT_NULL;
/* If we've sent a proc_wait_request to the proc server, the pid of the
@@ -1107,12 +1109,12 @@ inf_validate_procs (struct inf *inf)
if (inferior_ptid == ptid_t (inf->pid))
/* This is the first time we're hearing about thread
ids, after a fork-child. */
- thread_change_ptid (inferior_ptid, ptid);
+ thread_change_ptid (gnu_target, inferior_ptid, ptid);
else if (inf->pending_execs != 0)
/* This is a shell thread. */
- add_thread_silent (ptid);
+ add_thread_silent (gnu_target, ptid);
else
- add_thread (ptid);
+ add_thread (gnu_target, ptid);
}
}
@@ -2150,7 +2152,7 @@ gnu_nat_target::create_inferior (const char *exec_file,
/* We have something that executes now. We'll be running through
the shell at this point (if startup-with-shell is true), but the
pid shouldn't change. */
- add_thread_silent (ptid_t (pid));
+ add_thread_silent (gnu_target, ptid_t (pid));
/* Attach to the now stopped child, which is actually a shell... */
inf_debug (inf, "attaching to child: %d", pid);
@@ -2168,7 +2170,7 @@ gnu_nat_target::create_inferior (const char *exec_file,
inf_resume (inf);
/* We now have thread info. */
- thread_change_ptid (inferior_ptid,
+ thread_change_ptid (gnu_target, inferior_ptid,
ptid_t (inf->pid, inf_pick_first_thread (), 0));
gdb_startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED);
@@ -2274,7 +2276,7 @@ gnu_nat_target::detach (inferior *inf, int from_tty)
inf_detach (gnu_current_inf);
inferior_ptid = null_ptid;
- detach_inferior (find_inferior_pid (pid));
+ detach_inferior (find_inferior_pid (gnu_target, pid));
maybe_unpush_target ();
}