Remove ptid_build
This removes ptid_build in favor of simply calling the ptid_t constructor directly. gdb/ChangeLog 2018-07-03 Tom Tromey <tom@tromey.com> * common/ptid.h (ptid_build): Don't declare. * common/ptid.c (ptid_build): Remove. * aix-thread.c: Update. * bsd-kvm.c: Update. * bsd-uthread.c: Update. * common/agent.c: Update. * common/ptid.c: Update. * common/ptid.h: Update. * corelow.c: Update. * darwin-nat.c: Update. * fbsd-nat.c: Update. * gnu-nat.c: Update. * linux-fork.c: Update. * linux-nat.c: Update. * linux-thread-db.c: Update. * nat/linux-osdata.c: Update. * nat/linux-procfs.c: Update. * nto-procfs.c: Update. * obsd-nat.c: Update. * proc-service.c: Update. * procfs.c: Update. * ravenscar-thread.c: Update. * remote-sim.c: Update. * remote.c: Update. * sol-thread.c: Update. * target.c: Update. * windows-nat.c: Update. gdb/gdbserver/ChangeLog 2018-07-03 Tom Tromey <tom@tromey.com> * linux-low.c: Update. * lynx-low.c: Update. * nto-low.c: Update. * remote-utils.c: Update. * spu-low.c: Update. * thread-db.c: Update. * win32-low.c: Update.
This commit is contained in:
parent
057302ceb3
commit
fd79271bd9
@ -1,3 +1,33 @@
|
||||
2018-07-03 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* common/ptid.h (ptid_build): Don't declare.
|
||||
* common/ptid.c (ptid_build): Remove.
|
||||
* aix-thread.c: Update.
|
||||
* bsd-kvm.c: Update.
|
||||
* bsd-uthread.c: Update.
|
||||
* common/agent.c: Update.
|
||||
* common/ptid.c: Update.
|
||||
* common/ptid.h: Update.
|
||||
* corelow.c: Update.
|
||||
* darwin-nat.c: Update.
|
||||
* fbsd-nat.c: Update.
|
||||
* gnu-nat.c: Update.
|
||||
* linux-fork.c: Update.
|
||||
* linux-nat.c: Update.
|
||||
* linux-thread-db.c: Update.
|
||||
* nat/linux-osdata.c: Update.
|
||||
* nat/linux-procfs.c: Update.
|
||||
* nto-procfs.c: Update.
|
||||
* obsd-nat.c: Update.
|
||||
* proc-service.c: Update.
|
||||
* procfs.c: Update.
|
||||
* ravenscar-thread.c: Update.
|
||||
* remote-sim.c: Update.
|
||||
* remote.c: Update.
|
||||
* sol-thread.c: Update.
|
||||
* target.c: Update.
|
||||
* windows-nat.c: Update.
|
||||
|
||||
2018-07-03 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* infrun.c (follow_exec): Use exit_inferior_silent.
|
||||
|
@ -818,7 +818,7 @@ sync_threadlists (void)
|
||||
ptid_t pptid, gptid;
|
||||
int cmp_result;
|
||||
|
||||
pptid = ptid_build (infpid, 0, pbuf[pi].pthid);
|
||||
pptid = ptid_t (infpid, 0, pbuf[pi].pthid);
|
||||
gptid = gbuf[gi]->ptid;
|
||||
pdtid = pbuf[pi].pdtid;
|
||||
tid = pbuf[pi].tid;
|
||||
@ -1832,7 +1832,7 @@ aix_thread_target::extra_thread_info (struct thread_info *thread)
|
||||
ptid_t
|
||||
aix_thread_target::get_ada_task_ptid (long lwp, long thread)
|
||||
{
|
||||
return ptid_build (ptid_get_pid (inferior_ptid), 0, thread);
|
||||
return ptid_t (ptid_get_pid (inferior_ptid), 0, thread);
|
||||
}
|
||||
|
||||
|
||||
|
@ -413,5 +413,5 @@ Generic command for manipulating the kernel memory interface."),
|
||||
ptid (1, 1, 2) -> kvm inferior 1, process 2
|
||||
ptid (1, 1, n) -> kvm inferior 1, process n */
|
||||
|
||||
bsd_kvm_ptid = ptid_build (1, 1, 0);
|
||||
bsd_kvm_ptid = ptid_t (1, 1, 0);
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ bsd_uthread_target::wait (ptid_t ptid, struct target_waitstatus *status,
|
||||
{
|
||||
ULONGEST magic = extract_unsigned_integer (buf, 4, byte_order);
|
||||
if (magic == BSD_UTHREAD_PTHREAD_MAGIC)
|
||||
ptid = ptid_build (ptid_get_pid (ptid), 0, addr);
|
||||
ptid = ptid_t (ptid_get_pid (ptid), 0, addr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -466,7 +466,7 @@ bsd_uthread_target::update_thread_list ()
|
||||
addr = bsd_uthread_read_memory_address (bsd_uthread_thread_list_addr);
|
||||
while (addr != 0)
|
||||
{
|
||||
ptid_t ptid = ptid_build (pid, 0, addr);
|
||||
ptid_t ptid = ptid_t (pid, 0, addr);
|
||||
|
||||
thread_info *thread = find_thread_ptid (ptid);
|
||||
if (thread == nullptr || thread->state == THREAD_EXITED)
|
||||
|
@ -190,7 +190,7 @@ agent_run_command (int pid, const char *cmd, int len)
|
||||
{
|
||||
int fd;
|
||||
int tid = agent_get_helper_thread_id ();
|
||||
ptid_t ptid = ptid_build (pid, tid, 0);
|
||||
ptid_t ptid = ptid_t (pid, tid, 0);
|
||||
|
||||
int ret = target_write_memory (ipa_sym_addrs.addr_cmd_buf,
|
||||
(gdb_byte *) cmd, len);
|
||||
|
@ -27,14 +27,6 @@ ptid_t minus_one_ptid = ptid_t::make_minus_one ();
|
||||
|
||||
/* See ptid.h. */
|
||||
|
||||
ptid_t
|
||||
ptid_build (int pid, long lwp, long tid)
|
||||
{
|
||||
return ptid_t (pid, lwp, tid);
|
||||
}
|
||||
|
||||
/* See ptid.h. */
|
||||
|
||||
ptid_t
|
||||
pid_to_ptid (int pid)
|
||||
{
|
||||
|
@ -158,10 +158,6 @@ extern ptid_t minus_one_ptid;
|
||||
|
||||
/* See ptid_t::ptid_t. */
|
||||
|
||||
extern ptid_t ptid_build (int pid, long lwp, long tid);
|
||||
|
||||
/* See ptid_t::ptid_t. */
|
||||
|
||||
extern ptid_t pid_to_ptid (int pid);
|
||||
|
||||
/* See ptid_t::pid. */
|
||||
|
@ -310,7 +310,7 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
|
||||
inf->fake_pid_p = fake_pid_p;
|
||||
}
|
||||
|
||||
ptid = ptid_build (pid, lwpid, 0);
|
||||
ptid = ptid_t (pid, lwpid, 0);
|
||||
|
||||
add_thread (ptid);
|
||||
|
||||
|
@ -342,7 +342,7 @@ darwin_check_new_threads (struct inferior *inf)
|
||||
pti->msg_state = DARWIN_RUNNING;
|
||||
|
||||
/* Add the new thread. */
|
||||
add_thread_with_info (ptid_build (inf->pid, 0, new_id), pti);
|
||||
add_thread_with_info (ptid_t (inf->pid, 0, new_id), pti);
|
||||
new_thread_vec.push_back (pti);
|
||||
new_ix++;
|
||||
continue;
|
||||
@ -351,7 +351,7 @@ darwin_check_new_threads (struct inferior *inf)
|
||||
{
|
||||
/* A thread was removed. */
|
||||
struct thread_info *thr
|
||||
= find_thread_ptid (ptid_build (inf->pid, 0, old_id));
|
||||
= find_thread_ptid (ptid_t (inf->pid, 0, old_id));
|
||||
delete_thread (thr);
|
||||
kret = mach_port_deallocate (gdb_task, old_id);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
@ -1074,7 +1074,7 @@ darwin_decode_message (mach_msg_header_t *hdr,
|
||||
break;
|
||||
}
|
||||
|
||||
return ptid_build (inf->pid, 0, thread->gdb_port);
|
||||
return ptid_t (inf->pid, 0, thread->gdb_port);
|
||||
}
|
||||
else if (hdr->msgh_id == 0x48)
|
||||
{
|
||||
@ -1134,7 +1134,7 @@ darwin_decode_message (mach_msg_header_t *hdr,
|
||||
/* Looks necessary on Leopard and harmless... */
|
||||
wait4 (inf->pid, &wstatus, 0, NULL);
|
||||
|
||||
inferior_ptid = ptid_build (inf->pid, 0, 0);
|
||||
inferior_ptid = ptid_t (inf->pid, 0, 0);
|
||||
return inferior_ptid;
|
||||
}
|
||||
else
|
||||
@ -1142,7 +1142,7 @@ darwin_decode_message (mach_msg_header_t *hdr,
|
||||
inferior_debug (4, _("darwin_wait: pid=%d\n"), inf->pid);
|
||||
status->kind = TARGET_WAITKIND_EXITED;
|
||||
status->value.integer = 0; /* Don't know. */
|
||||
return ptid_build (inf->pid, 0, 0);
|
||||
return ptid_t (inf->pid, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1213,7 +1213,7 @@ darwin_wait (ptid_t ptid, struct target_waitstatus *status)
|
||||
status->value.sig = GDB_SIGNAL_TRAP;
|
||||
thread = priv->threads[0];
|
||||
thread->msg_state = DARWIN_STOPPED;
|
||||
return ptid_build (inf->pid, 0, thread->gdb_port);
|
||||
return ptid_t (inf->pid, 0, thread->gdb_port);
|
||||
}
|
||||
|
||||
do
|
||||
@ -1285,7 +1285,7 @@ darwin_wait (ptid_t ptid, struct target_waitstatus *status)
|
||||
&& thread->event.ex_type == EXC_BREAKPOINT)
|
||||
{
|
||||
if (thread->single_step
|
||||
|| cancel_breakpoint (ptid_build (inf->pid, 0, thread->gdb_port)))
|
||||
|| cancel_breakpoint (ptid_t (inf->pid, 0, thread->gdb_port)))
|
||||
{
|
||||
gdb_assert (thread->msg_state == DARWIN_MESSAGE);
|
||||
darwin_send_reply (inf, thread);
|
||||
@ -2272,7 +2272,7 @@ darwin_nat_target::get_ada_task_ptid (long lwp, long thread)
|
||||
for (darwin_thread_t *t : priv->threads)
|
||||
{
|
||||
if (t->inf_port == lwp)
|
||||
return ptid_build (ptid_get_pid (inferior_ptid), 0, t->gdb_port);
|
||||
return ptid_t (ptid_get_pid (inferior_ptid), 0, t->gdb_port);
|
||||
}
|
||||
|
||||
/* Maybe the port was never extract. Do it now. */
|
||||
@ -2316,7 +2316,7 @@ darwin_nat_target::get_ada_task_ptid (long lwp, long thread)
|
||||
names_count * sizeof (mach_port_t));
|
||||
|
||||
if (res)
|
||||
return ptid_build (ptid_get_pid (inferior_ptid), 0, res);
|
||||
return ptid_t (ptid_get_pid (inferior_ptid), 0, res);
|
||||
else
|
||||
return null_ptid;
|
||||
}
|
||||
|
@ -939,7 +939,7 @@ fbsd_add_threads (pid_t pid)
|
||||
|
||||
for (i = 0; i < nlwps; i++)
|
||||
{
|
||||
ptid_t ptid = ptid_build (pid, lwps[i], 0);
|
||||
ptid_t ptid = ptid_t (pid, lwps[i], 0);
|
||||
|
||||
if (!in_thread_list (ptid))
|
||||
{
|
||||
@ -1253,7 +1253,7 @@ fbsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
|
||||
if (ptrace (PT_LWPINFO, pid, (caddr_t) &pl, sizeof pl) == -1)
|
||||
perror_with_name (("ptrace"));
|
||||
|
||||
wptid = ptid_build (pid, pl.pl_lwpid, 0);
|
||||
wptid = ptid_t (pid, pl.pl_lwpid, 0);
|
||||
|
||||
if (debug_fbsd_nat)
|
||||
{
|
||||
@ -1357,7 +1357,7 @@ fbsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
|
||||
perror_with_name (("ptrace"));
|
||||
|
||||
gdb_assert (pl.pl_flags & PL_FLAG_CHILD);
|
||||
child_ptid = ptid_build (child, pl.pl_lwpid, 0);
|
||||
child_ptid = ptid_t (child, pl.pl_lwpid, 0);
|
||||
}
|
||||
|
||||
/* Enable additional events on the child process. */
|
||||
|
@ -1,3 +1,13 @@
|
||||
2018-07-03 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* linux-low.c: Update.
|
||||
* lynx-low.c: Update.
|
||||
* nto-low.c: Update.
|
||||
* remote-utils.c: Update.
|
||||
* spu-low.c: Update.
|
||||
* thread-db.c: Update.
|
||||
* win32-low.c: Update.
|
||||
|
||||
2018-06-29 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* linux-x86-tdesc.c (amd64_linux_read_description): Add missing
|
||||
|
@ -523,7 +523,7 @@ handle_extended_wait (struct lwp_info **orig_event_lwp, int wstat)
|
||||
struct thread_info *child_thr;
|
||||
struct target_desc *tdesc;
|
||||
|
||||
ptid = ptid_build (new_pid, new_pid, 0);
|
||||
ptid = ptid_t (new_pid, new_pid, 0);
|
||||
|
||||
if (debug_threads)
|
||||
{
|
||||
@ -630,7 +630,7 @@ handle_extended_wait (struct lwp_info **orig_event_lwp, int wstat)
|
||||
"from LWP %ld, new child is LWP %ld\n",
|
||||
lwpid_of (event_thr), new_pid);
|
||||
|
||||
ptid = ptid_build (pid_of (event_thr), new_pid, 0);
|
||||
ptid = ptid_t (pid_of (event_thr), new_pid, 0);
|
||||
new_lwp = add_lwp (ptid);
|
||||
|
||||
/* Either we're going to immediately resume the new thread
|
||||
@ -1017,7 +1017,7 @@ linux_create_inferior (const char *program,
|
||||
|
||||
linux_add_process (pid, 0);
|
||||
|
||||
ptid = ptid_build (pid, pid, 0);
|
||||
ptid = ptid_t (pid, pid, 0);
|
||||
new_lwp = add_lwp (ptid);
|
||||
new_lwp->must_set_ptrace_flags = 1;
|
||||
|
||||
@ -1185,7 +1185,7 @@ linux_attach (unsigned long pid)
|
||||
{
|
||||
struct process_info *proc;
|
||||
struct thread_info *initial_thread;
|
||||
ptid_t ptid = ptid_build (pid, pid, 0);
|
||||
ptid_t ptid = ptid_t (pid, pid, 0);
|
||||
int err;
|
||||
|
||||
/* Attach to PID. We will check for other threads
|
||||
@ -1202,7 +1202,7 @@ linux_attach (unsigned long pid)
|
||||
|
||||
/* Don't ignore the initial SIGSTOP if we just attached to this
|
||||
process. It will be collected by wait shortly. */
|
||||
initial_thread = find_thread_ptid (ptid_build (pid, pid, 0));
|
||||
initial_thread = find_thread_ptid (ptid_t (pid, pid, 0));
|
||||
initial_thread->last_resume_kind = resume_stop;
|
||||
|
||||
/* We must attach to every LWP. If /proc is mounted, use that to
|
||||
@ -2391,7 +2391,7 @@ linux_low_filter_event (int lwpid, int wstat)
|
||||
"after exec.\n", lwpid);
|
||||
}
|
||||
|
||||
child_ptid = ptid_build (lwpid, lwpid, 0);
|
||||
child_ptid = ptid_t (lwpid, lwpid, 0);
|
||||
child = add_lwp (child_ptid);
|
||||
child->stopped = 1;
|
||||
current_thread = child->thread;
|
||||
|
@ -64,14 +64,14 @@ lynx_debug (char *string, ...)
|
||||
/* Build a ptid_t given a PID and a LynxOS TID. */
|
||||
|
||||
static ptid_t
|
||||
lynx_ptid_build (int pid, long tid)
|
||||
lynx_ptid_t (int pid, long tid)
|
||||
{
|
||||
/* brobecker/2010-06-21: It looks like the LWP field in ptids
|
||||
should be distinct for each thread (see write_ptid where it
|
||||
writes the thread ID from the LWP). So instead of storing
|
||||
the LynxOS tid in the tid field of the ptid, we store it in
|
||||
the lwp field. */
|
||||
return ptid_build (pid, tid, 0);
|
||||
return ptid_t (pid, tid, 0);
|
||||
}
|
||||
|
||||
/* Return the process ID of the given PTID.
|
||||
@ -91,7 +91,7 @@ lynx_ptid_get_pid (ptid_t ptid)
|
||||
static long
|
||||
lynx_ptid_get_tid (ptid_t ptid)
|
||||
{
|
||||
/* See lynx_ptid_build: The LynxOS tid is stored inside the lwp field
|
||||
/* See lynx_ptid_t: The LynxOS tid is stored inside the lwp field
|
||||
of the ptid. */
|
||||
return ptid_get_lwp (ptid);
|
||||
}
|
||||
@ -294,7 +294,7 @@ lynx_add_threads_after_attach (int pid)
|
||||
if ((sscanf (buf, "%d %d", &thread_pid, &thread_tid) == 2
|
||||
&& thread_pid == pid))
|
||||
{
|
||||
ptid_t thread_ptid = lynx_ptid_build (pid, thread_tid);
|
||||
ptid_t thread_ptid = lynx_ptid_t (pid, thread_tid);
|
||||
|
||||
if (!find_thread_ptid (thread_ptid))
|
||||
{
|
||||
@ -312,7 +312,7 @@ lynx_add_threads_after_attach (int pid)
|
||||
static int
|
||||
lynx_attach (unsigned long pid)
|
||||
{
|
||||
ptid_t ptid = lynx_ptid_build (pid, 0);
|
||||
ptid_t ptid = lynx_ptid_t (pid, 0);
|
||||
|
||||
if (lynx_ptrace (PTRACE_ATTACH, ptid, 0, 0, 0) != 0)
|
||||
error ("Cannot attach to process %lu: %s (%d)\n", pid,
|
||||
@ -430,7 +430,7 @@ lynx_wait_1 (ptid_t ptid, struct target_waitstatus *status, int options)
|
||||
retry:
|
||||
|
||||
ret = lynx_waitpid (pid, &wstat);
|
||||
new_ptid = lynx_ptid_build (ret, ((union wait *) &wstat)->w_tid);
|
||||
new_ptid = lynx_ptid_t (ret, ((union wait *) &wstat)->w_tid);
|
||||
find_process_pid (ret)->priv->last_wait_event_ptid = new_ptid;
|
||||
|
||||
/* If this is a new thread, then add it now. The reason why we do
|
||||
@ -524,7 +524,7 @@ lynx_wait (ptid_t ptid, struct target_waitstatus *status, int options)
|
||||
static int
|
||||
lynx_kill (int pid)
|
||||
{
|
||||
ptid_t ptid = lynx_ptid_build (pid, 0);
|
||||
ptid_t ptid = lynx_ptid_t (pid, 0);
|
||||
struct target_waitstatus status;
|
||||
struct process_info *process;
|
||||
|
||||
@ -543,7 +543,7 @@ lynx_kill (int pid)
|
||||
static int
|
||||
lynx_detach (int pid)
|
||||
{
|
||||
ptid_t ptid = lynx_ptid_build (pid, 0);
|
||||
ptid_t ptid = lynx_ptid_t (pid, 0);
|
||||
struct process_info *process;
|
||||
|
||||
process = find_process_pid (pid);
|
||||
|
@ -142,7 +142,7 @@ nto_find_new_threads (struct nto_inferior *nto_inferior)
|
||||
{
|
||||
struct thread_info *ti;
|
||||
|
||||
ptid = ptid_build (nto_inferior->pid, tid, 0);
|
||||
ptid = ptid_t (nto_inferior->pid, tid, 0);
|
||||
ti = find_thread_ptid (ptid);
|
||||
if (ti != NULL)
|
||||
{
|
||||
@ -157,7 +157,7 @@ nto_find_new_threads (struct nto_inferior *nto_inferior)
|
||||
if (status.state != STATE_DEAD)
|
||||
{
|
||||
TRACE ("Adding thread %d\n", tid);
|
||||
ptid = ptid_build (nto_inferior->pid, tid, 0);
|
||||
ptid = ptid_t (nto_inferior->pid, tid, 0);
|
||||
if (!find_thread_ptid (ptid))
|
||||
add_thread (ptid, NULL);
|
||||
}
|
||||
@ -208,7 +208,7 @@ do_attach (pid_t pid)
|
||||
struct process_info *proc;
|
||||
|
||||
kill (pid, SIGCONT);
|
||||
ptid = ptid_build (status.pid, status.tid, 0);
|
||||
ptid = ptid_t (status.pid, status.tid, 0);
|
||||
the_low_target.arch_setup ();
|
||||
proc = add_process (status.pid, 1);
|
||||
proc->tdesc = nto_tdesc;
|
||||
@ -609,7 +609,7 @@ nto_wait (ptid_t ptid,
|
||||
}
|
||||
}
|
||||
|
||||
return ptid_build (status.pid, status.tid, 0);
|
||||
return ptid_t (status.pid, status.tid, 0);
|
||||
}
|
||||
|
||||
/* Fetch inferior's registers for currently selected thread (CURRENT_INFERIOR).
|
||||
@ -740,7 +740,7 @@ static void
|
||||
nto_request_interrupt (void)
|
||||
{
|
||||
TRACE ("%s\n", __func__);
|
||||
nto_set_thread (ptid_build (nto_inferior.pid, 1, 0));
|
||||
nto_set_thread (ptid_t (nto_inferior.pid, 1, 0));
|
||||
if (EOK != devctl (nto_inferior.ctl_fd, DCMD_PROC_STOP, NULL, 0, 0))
|
||||
TRACE ("Error stopping inferior.\n");
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ read_ptid (const char *buf, const char **obuf)
|
||||
|
||||
if (obuf)
|
||||
*obuf = pp;
|
||||
return ptid_build (pid, tid, 0);
|
||||
return ptid_t (pid, tid, 0);
|
||||
}
|
||||
|
||||
/* No multi-process. Just a tid. */
|
||||
@ -555,7 +555,7 @@ read_ptid (const char *buf, const char **obuf)
|
||||
|
||||
if (obuf)
|
||||
*obuf = pp;
|
||||
return ptid_build (pid, tid, 0);
|
||||
return ptid_t (pid, tid, 0);
|
||||
}
|
||||
|
||||
/* Write COUNT bytes in BUF to the client.
|
||||
|
@ -297,7 +297,7 @@ spu_create_inferior (const char *program,
|
||||
proc = add_process (pid, 0);
|
||||
proc->tdesc = tdesc_spu;
|
||||
|
||||
ptid = ptid_build (pid, pid, 0);
|
||||
ptid = ptid_t (pid, pid, 0);
|
||||
add_thread (ptid, NULL);
|
||||
return pid;
|
||||
}
|
||||
@ -319,7 +319,7 @@ spu_attach (unsigned long pid)
|
||||
|
||||
proc = add_process (pid, 1);
|
||||
proc->tdesc = tdesc_spu;
|
||||
ptid = ptid_build (pid, pid, 0);
|
||||
ptid = ptid_t (pid, pid, 0);
|
||||
add_thread (ptid, NULL);
|
||||
return 0;
|
||||
}
|
||||
@ -474,12 +474,12 @@ spu_wait (ptid_t ptid, struct target_waitstatus *ourstatus, int options)
|
||||
{
|
||||
ourstatus->kind = TARGET_WAITKIND_STOPPED;
|
||||
ourstatus->value.sig = GDB_SIGNAL_0;
|
||||
return ptid_build (ret, ret, 0);
|
||||
return ptid_t (ret, ret, 0);
|
||||
}
|
||||
|
||||
ourstatus->kind = TARGET_WAITKIND_STOPPED;
|
||||
ourstatus->value.sig = gdb_signal_from_host (WSTOPSIG (w));
|
||||
return ptid_build (ret, ret, 0);
|
||||
return ptid_t (ret, ret, 0);
|
||||
}
|
||||
|
||||
/* Fetch inferior registers. */
|
||||
|
@ -215,7 +215,7 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
|
||||
{
|
||||
struct process_info *proc = current_process ();
|
||||
int pid = pid_of (proc);
|
||||
ptid_t ptid = ptid_build (pid, ti_p->ti_lid, 0);
|
||||
ptid_t ptid = ptid_t (pid, ti_p->ti_lid, 0);
|
||||
struct lwp_info *lwp;
|
||||
int err;
|
||||
|
||||
|
@ -120,7 +120,7 @@ current_thread_ptid (void)
|
||||
static ptid_t
|
||||
debug_event_ptid (DEBUG_EVENT *event)
|
||||
{
|
||||
return ptid_build (event->dwProcessId, event->dwThreadId, 0);
|
||||
return ptid_t (event->dwProcessId, event->dwThreadId, 0);
|
||||
}
|
||||
|
||||
/* Get the thread context of the thread associated with TH. */
|
||||
@ -208,7 +208,7 @@ static win32_thread_info *
|
||||
child_add_thread (DWORD pid, DWORD tid, HANDLE h, void *tlb)
|
||||
{
|
||||
win32_thread_info *th;
|
||||
ptid_t ptid = ptid_build (pid, tid, 0);
|
||||
ptid_t ptid = ptid_t (pid, tid, 0);
|
||||
|
||||
if ((th = thread_rec (ptid, FALSE)))
|
||||
return th;
|
||||
|
@ -1096,7 +1096,7 @@ inf_validate_procs (struct inf *inf)
|
||||
last = thread;
|
||||
proc_debug (thread, "new thread: %lu", threads[i]);
|
||||
|
||||
ptid = ptid_build (inf->pid, thread->tid, 0);
|
||||
ptid = ptid_t (inf->pid, thread->tid, 0);
|
||||
|
||||
/* Tell GDB's generic thread code. */
|
||||
|
||||
@ -1616,7 +1616,7 @@ rewait:
|
||||
|
||||
thread = inf->wait.thread;
|
||||
if (thread)
|
||||
ptid = ptid_build (inf->pid, thread->tid, 0);
|
||||
ptid = ptid_t (inf->pid, thread->tid, 0);
|
||||
else if (ptid_equal (ptid, minus_one_ptid))
|
||||
thread = inf_tid_to_thread (inf, -1);
|
||||
else
|
||||
@ -1626,7 +1626,7 @@ rewait:
|
||||
{
|
||||
/* TID is dead; try and find a new thread. */
|
||||
if (inf_update_procs (inf) && inf->threads)
|
||||
ptid = ptid_build (inf->pid, inf->threads->tid, 0); /* The first
|
||||
ptid = ptid_t (inf->pid, inf->threads->tid, 0); /* The first
|
||||
available
|
||||
thread. */
|
||||
else
|
||||
@ -2167,7 +2167,7 @@ gnu_nat_target::create_inferior (const char *exec_file,
|
||||
|
||||
/* We now have thread info. */
|
||||
thread_change_ptid (inferior_ptid,
|
||||
ptid_build (inf->pid, inf_pick_first_thread (), 0));
|
||||
ptid_t (inf->pid, inf_pick_first_thread (), 0));
|
||||
|
||||
gdb_startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED);
|
||||
|
||||
@ -2228,7 +2228,7 @@ gnu_nat_target::attach (const char *args, int from_tty)
|
||||
|
||||
inf_update_procs (inf);
|
||||
|
||||
inferior_ptid = ptid_build (pid, inf_pick_first_thread (), 0);
|
||||
inferior_ptid = ptid_t (pid, inf_pick_first_thread (), 0);
|
||||
|
||||
/* We have to initialize the terminal settings now, since the code
|
||||
below might try to restore them. */
|
||||
|
@ -94,7 +94,7 @@ add_fork (pid_t pid)
|
||||
}
|
||||
|
||||
fp = XCNEW (struct fork_info);
|
||||
fp->ptid = ptid_build (pid, pid, 0);
|
||||
fp->ptid = ptid_t (pid, pid, 0);
|
||||
fp->num = ++highest_fork_num;
|
||||
|
||||
if (fork_list == NULL)
|
||||
|
@ -940,7 +940,7 @@ find_lwp_pid (ptid_t ptid)
|
||||
else
|
||||
lwp = ptid_get_pid (ptid);
|
||||
|
||||
dummy.ptid = ptid_build (0, lwp, 0);
|
||||
dummy.ptid = ptid_t (0, lwp, 0);
|
||||
lp = (struct lwp_info *) htab_find (lwp_lwpid_htab, &dummy);
|
||||
return lp;
|
||||
}
|
||||
@ -1196,9 +1196,9 @@ linux_nat_target::attach (const char *args, int from_tty)
|
||||
|
||||
/* The ptrace base target adds the main thread with (pid,0,0)
|
||||
format. Decorate it with lwp info. */
|
||||
ptid = ptid_build (ptid_get_pid (inferior_ptid),
|
||||
ptid_get_pid (inferior_ptid),
|
||||
0);
|
||||
ptid = ptid_t (ptid_get_pid (inferior_ptid),
|
||||
ptid_get_pid (inferior_ptid),
|
||||
0);
|
||||
thread_change_ptid (inferior_ptid, ptid);
|
||||
|
||||
/* Add the initial process as the first LWP to the list. */
|
||||
@ -1958,7 +1958,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status)
|
||||
_("wait returned unexpected status 0x%x"), status);
|
||||
}
|
||||
|
||||
ourstatus->value.related_pid = ptid_build (new_pid, new_pid, 0);
|
||||
ourstatus->value.related_pid = ptid_t (new_pid, new_pid, 0);
|
||||
|
||||
if (event == PTRACE_EVENT_FORK || event == PTRACE_EVENT_VFORK)
|
||||
{
|
||||
@ -1977,7 +1977,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status)
|
||||
|
||||
/* This won't actually modify the breakpoint list, but will
|
||||
physically remove the breakpoints from the child. */
|
||||
detach_breakpoints (ptid_build (new_pid, new_pid, 0));
|
||||
detach_breakpoints (ptid_t (new_pid, new_pid, 0));
|
||||
|
||||
/* Retain child fork in ptrace (stopped) state. */
|
||||
if (!find_fork_pid (new_pid))
|
||||
@ -2008,7 +2008,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status)
|
||||
"from LWP %d, new child is LWP %ld\n",
|
||||
pid, new_pid);
|
||||
|
||||
new_lp = add_lwp (ptid_build (ptid_get_pid (lp->ptid), new_pid, 0));
|
||||
new_lp = add_lwp (ptid_t (ptid_get_pid (lp->ptid), new_pid, 0));
|
||||
new_lp->stopped = 1;
|
||||
new_lp->resumed = 1;
|
||||
|
||||
@ -2944,7 +2944,7 @@ linux_nat_filter_event (int lwpid, int status)
|
||||
"LLW: Re-adding thread group leader LWP %d.\n",
|
||||
lwpid);
|
||||
|
||||
lp = add_lwp (ptid_build (lwpid, lwpid, 0));
|
||||
lp = add_lwp (ptid_t (lwpid, lwpid, 0));
|
||||
lp->stopped = 1;
|
||||
lp->resumed = 1;
|
||||
add_thread (lp->ptid);
|
||||
@ -3259,8 +3259,8 @@ linux_nat_wait_1 (ptid_t ptid, struct target_waitstatus *ourstatus,
|
||||
{
|
||||
/* Upgrade the main thread's ptid. */
|
||||
thread_change_ptid (inferior_ptid,
|
||||
ptid_build (ptid_get_pid (inferior_ptid),
|
||||
ptid_get_pid (inferior_ptid), 0));
|
||||
ptid_t (ptid_get_pid (inferior_ptid),
|
||||
ptid_get_pid (inferior_ptid), 0));
|
||||
|
||||
lp = add_initial_lwp (inferior_ptid);
|
||||
lp->resumed = 1;
|
||||
@ -4241,7 +4241,7 @@ linux_nat_target::static_tracepoint_markers_by_strid (const char *strid)
|
||||
int pid = ptid_get_pid (inferior_ptid);
|
||||
std::vector<static_tracepoint_marker> markers;
|
||||
const char *p = s;
|
||||
ptid_t ptid = ptid_build (pid, 0, 0);
|
||||
ptid_t ptid = ptid_t (pid, 0, 0);
|
||||
static_tracepoint_marker marker;
|
||||
|
||||
/* Pause all */
|
||||
|
@ -674,7 +674,7 @@ check_thread_db_callback (const td_thrhandle_t *th, void *arg)
|
||||
calls are made, we just assume they were; future changes
|
||||
to how GDB accesses TLS could result in this passing
|
||||
without exercising the calls it's supposed to. */
|
||||
ptid_t ptid = ptid_build (tdb_testinfo->info->pid, ti.ti_lid, 0);
|
||||
ptid_t ptid = ptid_t (tdb_testinfo->info->pid, ti.ti_lid, 0);
|
||||
struct thread_info *thread_info = find_thread_ptid (ptid);
|
||||
if (thread_info != NULL && thread_info->priv != NULL)
|
||||
{
|
||||
@ -1784,7 +1784,7 @@ ptid_t
|
||||
thread_db_target::get_ada_task_ptid (long lwp, long thread)
|
||||
{
|
||||
/* NPTL uses a 1:1 model, so the LWP id suffices. */
|
||||
return ptid_build (ptid_get_pid (inferior_ptid), lwp, 0);
|
||||
return ptid_t (ptid_get_pid (inferior_ptid), lwp, 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -266,8 +266,8 @@ get_cores_used_by_process (PID_T pid, int *cores, const int num_cores)
|
||||
continue;
|
||||
|
||||
sscanf (dp->d_name, "%lld", &tid);
|
||||
core = linux_common_core_of_thread (ptid_build ((pid_t) pid,
|
||||
(pid_t) tid, 0));
|
||||
core = linux_common_core_of_thread (ptid_t ((pid_t) pid,
|
||||
(pid_t) tid, 0));
|
||||
|
||||
if (core >= 0 && core < num_cores)
|
||||
{
|
||||
@ -595,7 +595,7 @@ linux_xfer_osdata_threads (gdb_byte *readbuf,
|
||||
continue;
|
||||
|
||||
tid = atoi (dp2->d_name);
|
||||
core = linux_common_core_of_thread (ptid_build (pid, tid, 0));
|
||||
core = linux_common_core_of_thread (ptid_t (pid, tid, 0));
|
||||
|
||||
buffer_xml_printf (
|
||||
&buffer,
|
||||
|
@ -308,7 +308,7 @@ linux_proc_attach_tgid_threads (pid_t pid,
|
||||
lwp = strtoul (dp->d_name, NULL, 10);
|
||||
if (lwp != 0)
|
||||
{
|
||||
ptid_t ptid = ptid_build (pid, lwp, 0);
|
||||
ptid_t ptid = ptid_t (pid, lwp, 0);
|
||||
|
||||
if (attach_lwp (ptid))
|
||||
new_threads_found = 1;
|
||||
|
@ -413,7 +413,7 @@ nto_procfs_target::update_thread_list ()
|
||||
returned different tid, meaning the requested tid no longer exists
|
||||
(e.g. thread exited). */
|
||||
continue;
|
||||
ptid = ptid_build (pid, 0, tid);
|
||||
ptid = ptid_t (pid, 0, tid);
|
||||
new_thread = find_thread_ptid (ptid);
|
||||
if (!new_thread)
|
||||
new_thread = add_thread (ptid);
|
||||
@ -766,7 +766,7 @@ do_attach (ptid_t ptid)
|
||||
&& status.flags & _DEBUG_FLAG_STOPPED)
|
||||
SignalKill (nto_node (), ptid_get_pid (ptid), 0, SIGCONT, 0, 0);
|
||||
nto_init_solib_absolute_prefix ();
|
||||
return ptid_build (ptid_get_pid (ptid), 0, status.tid);
|
||||
return ptid_t (ptid_get_pid (ptid), 0, status.tid);
|
||||
}
|
||||
|
||||
/* Ask the user what to do when an interrupt is received. */
|
||||
@ -899,7 +899,7 @@ nto_procfs_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
|
||||
}
|
||||
}
|
||||
|
||||
return ptid_build (status.pid, 0, status.tid);
|
||||
return ptid_t (status.pid, 0, status.tid);
|
||||
}
|
||||
|
||||
/* Read the current values of the inferior's registers, both the
|
||||
|
@ -62,7 +62,7 @@ obsd_nat_target::update_thread_list ()
|
||||
|
||||
while (pts.pts_tid != -1)
|
||||
{
|
||||
ptid_t ptid = ptid_build (pid, pts.pts_tid, 0);
|
||||
ptid_t ptid = ptid_t (pid, pts.pts_tid, 0);
|
||||
|
||||
if (!in_thread_list (ptid))
|
||||
{
|
||||
@ -151,7 +151,7 @@ obsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
|
||||
return pid_to_ptid (pid);
|
||||
}
|
||||
|
||||
ptid = ptid_build (pid, pe.pe_tid, 0);
|
||||
ptid = ptid_t (pid, pe.pe_tid, 0);
|
||||
if (!in_thread_list (ptid))
|
||||
{
|
||||
if (ptid_get_lwp (inferior_ptid) == 0)
|
||||
|
14
gdb/procfs.c
14
gdb/procfs.c
@ -1996,7 +1996,7 @@ do_attach (ptid_t ptid)
|
||||
create_procinfo (pi->pid, lwpid);
|
||||
|
||||
/* Add it to gdb's thread list. */
|
||||
ptid = ptid_build (pi->pid, lwpid, 0);
|
||||
ptid = ptid_t (pi->pid, lwpid, 0);
|
||||
add_thread (ptid);
|
||||
|
||||
return ptid;
|
||||
@ -2283,7 +2283,7 @@ wait_again:
|
||||
|
||||
/* The 'pid' we will return to GDB is composed of
|
||||
the process ID plus the lwp ID. */
|
||||
retval = ptid_build (pi->pid, proc_get_current_thread (pi), 0);
|
||||
retval = ptid_t (pi->pid, proc_get_current_thread (pi), 0);
|
||||
|
||||
switch (why) {
|
||||
case PR_SIGNALLED:
|
||||
@ -2400,7 +2400,7 @@ wait_again:
|
||||
if (!find_procinfo (pi->pid, temp_tid))
|
||||
create_procinfo (pi->pid, temp_tid);
|
||||
|
||||
temp_ptid = ptid_build (pi->pid, temp_tid, 0);
|
||||
temp_ptid = ptid_t (pi->pid, temp_tid, 0);
|
||||
/* If not in GDB's thread list, add it. */
|
||||
if (!in_thread_list (temp_ptid))
|
||||
add_thread (temp_ptid);
|
||||
@ -2468,7 +2468,7 @@ wait_again:
|
||||
create_procinfo (pi->pid, temp_tid);
|
||||
|
||||
/* If not in GDB's thread list, add it. */
|
||||
temp_ptid = ptid_build (pi->pid, temp_tid, 0);
|
||||
temp_ptid = ptid_t (pi->pid, temp_tid, 0);
|
||||
if (!in_thread_list (temp_ptid))
|
||||
add_thread (temp_ptid);
|
||||
|
||||
@ -2960,7 +2960,7 @@ procfs_init_inferior (struct target_ops *ops, int pid)
|
||||
this point, but it didn't have any lwp info yet. Notify the core
|
||||
about it. This changes inferior_ptid as well. */
|
||||
thread_change_ptid (pid_to_ptid (pid),
|
||||
ptid_build (pid, lwpid, 0));
|
||||
ptid_t (pid, lwpid, 0));
|
||||
|
||||
gdb_startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED);
|
||||
}
|
||||
@ -3143,7 +3143,7 @@ procfs_inferior_created (struct target_ops *ops, int from_tty)
|
||||
static int
|
||||
procfs_notice_thread (procinfo *pi, procinfo *thread, void *ptr)
|
||||
{
|
||||
ptid_t gdb_threadid = ptid_build (pi->pid, thread->tid, 0);
|
||||
ptid_t gdb_threadid = ptid_t (pi->pid, thread->tid, 0);
|
||||
|
||||
if (!in_thread_list (gdb_threadid) || is_exited (gdb_threadid))
|
||||
add_thread (gdb_threadid);
|
||||
@ -3807,7 +3807,7 @@ procfs_corefile_thread_callback (procinfo *pi, procinfo *thread, void *data)
|
||||
|
||||
if (pi != NULL)
|
||||
{
|
||||
ptid_t ptid = ptid_build (pi->pid, thread->tid, 0);
|
||||
ptid_t ptid = ptid_t (pi->pid, thread->tid, 0);
|
||||
|
||||
args->note_data = procfs_do_thread_registers (args->obfd, ptid,
|
||||
args->note_data,
|
||||
|
@ -211,7 +211,7 @@ get_base_thread_from_ravenscar_task (ptid_t ptid)
|
||||
return ptid;
|
||||
|
||||
base_cpu = ravenscar_get_thread_base_cpu (ptid);
|
||||
return ptid_build (ptid_get_pid (ptid), base_cpu, 0);
|
||||
return ptid_t (ptid_get_pid (ptid), base_cpu, 0);
|
||||
}
|
||||
|
||||
/* Fetch the ravenscar running thread from target memory and
|
||||
@ -384,7 +384,7 @@ ravenscar_active_task (int cpu)
|
||||
if (tid == 0)
|
||||
return null_ptid;
|
||||
else
|
||||
return ptid_build (ptid_get_pid (base_ptid), 0, tid);
|
||||
return ptid_t (ptid_get_pid (base_ptid), 0, tid);
|
||||
}
|
||||
|
||||
const char *
|
||||
@ -571,7 +571,7 @@ ravenscar_inferior_created (struct target_ops *target, int from_tty)
|
||||
ptid_t
|
||||
ravenscar_thread_target::get_ada_task_ptid (long lwp, long thread)
|
||||
{
|
||||
return ptid_build (ptid_get_pid (base_ptid), 0, thread);
|
||||
return ptid_t (ptid_get_pid (base_ptid), 0, thread);
|
||||
}
|
||||
|
||||
/* Command-list for the "set/show ravenscar" prefix command. */
|
||||
|
@ -253,7 +253,7 @@ get_sim_inferior_data (struct inferior *inf, int sim_instance_needed)
|
||||
set_inferior_data (inf, sim_inferior_data_key, sim_data);
|
||||
|
||||
/* Allocate a ptid for this inferior. */
|
||||
sim_data->remote_sim_ptid = ptid_build (next_pid, 0, next_pid);
|
||||
sim_data->remote_sim_ptid = ptid_t (next_pid, 0, next_pid);
|
||||
next_pid++;
|
||||
|
||||
/* Initialize the other instance variables. */
|
||||
|
18
gdb/remote.c
18
gdb/remote.c
@ -2955,7 +2955,7 @@ read_ptid (const char *buf, const char **obuf)
|
||||
pp = unpack_varlen_hex (p + 1, &tid);
|
||||
if (obuf)
|
||||
*obuf = pp;
|
||||
return ptid_build (pid, tid, 0);
|
||||
return ptid_t (pid, tid, 0);
|
||||
}
|
||||
|
||||
/* No multi-process. Just a tid. */
|
||||
@ -2980,7 +2980,7 @@ read_ptid (const char *buf, const char **obuf)
|
||||
|
||||
if (obuf)
|
||||
*obuf = pp;
|
||||
return ptid_build (pid, tid, 0);
|
||||
return ptid_t (pid, tid, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -3972,7 +3972,7 @@ remote_target::static_tracepoint_markers_by_strid (const char *strid)
|
||||
ptid_t
|
||||
remote_target::get_ada_task_ptid (long lwp, long thread)
|
||||
{
|
||||
return ptid_build (ptid_get_pid (inferior_ptid), lwp, 0);
|
||||
return ptid_t (ptid_get_pid (inferior_ptid), lwp, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -6037,7 +6037,7 @@ remote_target::append_resumption (char *p, char *endp,
|
||||
ptid_t nptid;
|
||||
|
||||
/* All (-1) threads of process. */
|
||||
nptid = ptid_build (ptid_get_pid (ptid), -1, 0);
|
||||
nptid = ptid_t (ptid_get_pid (ptid), -1, 0);
|
||||
|
||||
p += xsnprintf (p, endp - p, ":");
|
||||
p = write_ptid (p, endp, nptid);
|
||||
@ -6615,7 +6615,7 @@ remote_target::remote_stop_ns (ptid_t ptid)
|
||||
|
||||
if (ptid_is_pid (ptid))
|
||||
/* All (-1) threads of process. */
|
||||
nptid = ptid_build (ptid_get_pid (ptid), -1, 0);
|
||||
nptid = ptid_t (ptid_get_pid (ptid), -1, 0);
|
||||
else
|
||||
{
|
||||
/* Small optimization: if we already have a stop reply for
|
||||
@ -11321,7 +11321,7 @@ threadalive_test (const char *cmd, int tty)
|
||||
{
|
||||
int sample_thread = SAMPLE_THREAD;
|
||||
int pid = ptid_get_pid (inferior_ptid);
|
||||
ptid_t ptid = ptid_build (pid, sample_thread, 0);
|
||||
ptid_t ptid = ptid_t (pid, sample_thread, 0);
|
||||
|
||||
if (remote_thread_alive (ptid))
|
||||
printf_filtered ("PASS: Thread alive test\n");
|
||||
@ -14737,7 +14737,7 @@ stepping is supported by the target. The default is on."),
|
||||
|
||||
/* Take advantage of the fact that the TID field is not used, to tag
|
||||
special ptids with it set to != 0. */
|
||||
magic_null_ptid = ptid_build (42000, -1, 1);
|
||||
not_sent_ptid = ptid_build (42000, -2, 1);
|
||||
any_thread_ptid = ptid_build (42000, 0, 1);
|
||||
magic_null_ptid = ptid_t (42000, -1, 1);
|
||||
not_sent_ptid = ptid_t (42000, -2, 1);
|
||||
any_thread_ptid = ptid_t (42000, 0, 1);
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ thread_to_lwp (ptid_t thread_id, int default_lwp)
|
||||
td_state_string (ti.ti_state));
|
||||
}
|
||||
|
||||
return ptid_build (ptid_get_pid (thread_id), ti.ti_lid, 0);
|
||||
return ptid_t (ptid_get_pid (thread_id), ti.ti_lid, 0);
|
||||
}
|
||||
|
||||
/* Convert an LWP ID into a POSIX or Solaris thread ID. If LWP_ID
|
||||
@ -366,7 +366,7 @@ lwp_to_thread (ptid_t lwp)
|
||||
else if (val != TD_OK)
|
||||
error (_("lwp_to_thread: td_thr_get_info: %s."), td_err_string (val));
|
||||
|
||||
return ptid_build (ptid_get_pid (lwp), 0 , ti.ti_tid);
|
||||
return ptid_t (ptid_get_pid (lwp), 0 , ti.ti_tid);
|
||||
}
|
||||
|
||||
|
||||
@ -849,7 +849,7 @@ ps_ptwrite (struct ps_prochandle *ph, psaddr_t addr,
|
||||
ps_err_e
|
||||
ps_lgetregs (struct ps_prochandle *ph, lwpid_t lwpid, prgregset_t gregset)
|
||||
{
|
||||
ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
|
||||
ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
|
||||
struct regcache *regcache
|
||||
= get_thread_arch_regcache (ptid, target_gdbarch ());
|
||||
|
||||
@ -865,7 +865,7 @@ ps_err_e
|
||||
ps_lsetregs (struct ps_prochandle *ph, lwpid_t lwpid,
|
||||
const prgregset_t gregset)
|
||||
{
|
||||
ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
|
||||
ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
|
||||
struct regcache *regcache
|
||||
= get_thread_arch_regcache (ptid, target_gdbarch ());
|
||||
|
||||
@ -917,7 +917,7 @@ ps_err_e
|
||||
ps_lgetfpregs (struct ps_prochandle *ph, lwpid_t lwpid,
|
||||
prfpregset_t *fpregset)
|
||||
{
|
||||
ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
|
||||
ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
|
||||
struct regcache *regcache
|
||||
= get_thread_arch_regcache (ptid, target_gdbarch ());
|
||||
|
||||
@ -933,7 +933,7 @@ ps_err_e
|
||||
ps_lsetfpregs (struct ps_prochandle *ph, lwpid_t lwpid,
|
||||
const prfpregset_t * fpregset)
|
||||
{
|
||||
ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
|
||||
ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
|
||||
struct regcache *regcache
|
||||
= get_thread_arch_regcache (ptid, target_gdbarch ());
|
||||
|
||||
@ -982,7 +982,7 @@ ps_lgetLDT (struct ps_prochandle *ph, lwpid_t lwpid,
|
||||
if (ptid_get_pid (inferior_ptid) <= 0 || lwpid <= 0)
|
||||
return PS_BADLID;
|
||||
|
||||
ret = procfs_find_LDT_entry (ptid_build (ptid_get_pid (inferior_ptid),
|
||||
ret = procfs_find_LDT_entry (ptid_t (ptid_get_pid (inferior_ptid),
|
||||
lwpid, 0));
|
||||
if (ret)
|
||||
{
|
||||
@ -1042,7 +1042,7 @@ sol_update_thread_list_callback (const td_thrhandle_t *th, void *ignored)
|
||||
if (retval != TD_OK)
|
||||
return -1;
|
||||
|
||||
ptid = ptid_build (ptid_get_pid (inferior_ptid), 0, ti.ti_tid);
|
||||
ptid = ptid_t (ptid_get_pid (inferior_ptid), 0, ti.ti_tid);
|
||||
if (!in_thread_list (ptid) || is_exited (ptid))
|
||||
add_thread (ptid);
|
||||
|
||||
|
@ -618,7 +618,7 @@ default_terminal_info (struct target_ops *self, const char *args, int from_tty)
|
||||
static ptid_t
|
||||
default_get_ada_task_ptid (struct target_ops *self, long lwp, long tid)
|
||||
{
|
||||
return ptid_build (ptid_get_pid (inferior_ptid), lwp, tid);
|
||||
return ptid_t (ptid_get_pid (inferior_ptid), lwp, tid);
|
||||
}
|
||||
|
||||
static enum exec_direction_kind
|
||||
|
@ -1371,8 +1371,8 @@ fake_create_process (void)
|
||||
}
|
||||
main_thread_id = current_event.dwThreadId;
|
||||
current_thread = windows_add_thread (
|
||||
ptid_build (current_event.dwProcessId, 0,
|
||||
current_event.dwThreadId),
|
||||
ptid_t (current_event.dwProcessId, 0,
|
||||
current_event.dwThreadId),
|
||||
current_event.u.CreateThread.hThread,
|
||||
current_event.u.CreateThread.lpThreadLocalBase);
|
||||
return main_thread_id;
|
||||
@ -1544,8 +1544,8 @@ get_windows_debug_event (struct target_ops *ops,
|
||||
}
|
||||
/* Record the existence of this thread. */
|
||||
thread_id = current_event.dwThreadId;
|
||||
th = windows_add_thread (ptid_build (current_event.dwProcessId, 0,
|
||||
current_event.dwThreadId),
|
||||
th = windows_add_thread (ptid_t (current_event.dwProcessId, 0,
|
||||
current_event.dwThreadId),
|
||||
current_event.u.CreateThread.hThread,
|
||||
current_event.u.CreateThread.lpThreadLocalBase);
|
||||
|
||||
@ -1559,8 +1559,8 @@ get_windows_debug_event (struct target_ops *ops,
|
||||
|
||||
if (current_event.dwThreadId != main_thread_id)
|
||||
{
|
||||
windows_delete_thread (ptid_build (current_event.dwProcessId, 0,
|
||||
current_event.dwThreadId),
|
||||
windows_delete_thread (ptid_t (current_event.dwProcessId, 0,
|
||||
current_event.dwThreadId),
|
||||
current_event.u.ExitThread.dwExitCode);
|
||||
th = &dummy_thread_info;
|
||||
}
|
||||
@ -1577,13 +1577,13 @@ get_windows_debug_event (struct target_ops *ops,
|
||||
|
||||
current_process_handle = current_event.u.CreateProcessInfo.hProcess;
|
||||
if (main_thread_id)
|
||||
windows_delete_thread (ptid_build (current_event.dwProcessId, 0,
|
||||
main_thread_id),
|
||||
windows_delete_thread (ptid_t (current_event.dwProcessId, 0,
|
||||
main_thread_id),
|
||||
0);
|
||||
main_thread_id = current_event.dwThreadId;
|
||||
/* Add the main thread. */
|
||||
th = windows_add_thread (ptid_build (current_event.dwProcessId, 0,
|
||||
current_event.dwThreadId),
|
||||
th = windows_add_thread (ptid_t (current_event.dwProcessId, 0,
|
||||
current_event.dwThreadId),
|
||||
current_event.u.CreateProcessInfo.hThread,
|
||||
current_event.u.CreateProcessInfo.lpThreadLocalBase);
|
||||
thread_id = current_event.dwThreadId;
|
||||
@ -1685,8 +1685,7 @@ get_windows_debug_event (struct target_ops *ops,
|
||||
}
|
||||
else
|
||||
{
|
||||
inferior_ptid = ptid_build (current_event.dwProcessId, 0,
|
||||
thread_id);
|
||||
inferior_ptid = ptid_t (current_event.dwProcessId, 0, thread_id);
|
||||
current_thread = th;
|
||||
if (!current_thread)
|
||||
current_thread = thread_rec (thread_id, TRUE);
|
||||
@ -1746,7 +1745,7 @@ windows_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
|
||||
SetConsoleCtrlHandler (&ctrl_c_handler, FALSE);
|
||||
|
||||
if (retval)
|
||||
return ptid_build (current_event.dwProcessId, 0, retval);
|
||||
return ptid_t (current_event.dwProcessId, 0, retval);
|
||||
else
|
||||
{
|
||||
int detach = 0;
|
||||
@ -3021,7 +3020,7 @@ windows_nat_target::get_tib_address (ptid_t ptid, CORE_ADDR *addr)
|
||||
ptid_t
|
||||
windows_nat_target::get_ada_task_ptid (long lwp, long thread)
|
||||
{
|
||||
return ptid_build (ptid_get_pid (inferior_ptid), 0, lwp);
|
||||
return ptid_t (ptid_get_pid (inferior_ptid), 0, lwp);
|
||||
}
|
||||
|
||||
/* Implementation of the to_thread_name method. */
|
||||
|
Loading…
Reference in New Issue
Block a user