diff options
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.c | 12 | ||||
-rw-r--r-- | gdb/gdbserver/lynx-low.c | 16 | ||||
-rw-r--r-- | gdb/gdbserver/nto-low.c | 10 | ||||
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 4 | ||||
-rw-r--r-- | gdb/gdbserver/spu-low.c | 8 | ||||
-rw-r--r-- | gdb/gdbserver/thread-db.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/win32-low.c | 4 |
8 files changed, 38 insertions, 28 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index c90de7c..c20f222 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -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 diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 1211944..ce4d660 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -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; diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c index a0b9817..b19ea62 100644 --- a/gdb/gdbserver/lynx-low.c +++ b/gdb/gdbserver/lynx-low.c @@ -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); diff --git a/gdb/gdbserver/nto-low.c b/gdb/gdbserver/nto-low.c index b68b811..ed28426 100644 --- a/gdb/gdbserver/nto-low.c +++ b/gdb/gdbserver/nto-low.c @@ -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"); } diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 967b2f0e..a1a06dc 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -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. diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c index 5b880d2..13f2b35 100644 --- a/gdb/gdbserver/spu-low.c +++ b/gdb/gdbserver/spu-low.c @@ -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. */ diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c index 7dda2ed..3e42db4 100644 --- a/gdb/gdbserver/thread-db.c +++ b/gdb/gdbserver/thread-db.c @@ -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; diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index 8f5ea5a..05bea69 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -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; |