aboutsummaryrefslogtreecommitdiff
path: root/gdbserver
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-09-16 13:06:27 -0600
committerTom Tromey <tromey@adacore.com>2021-09-23 09:30:54 -0600
commit184ea2f7316c54dd5e0fa84f1fe07a222e8fb44c (patch)
treecb5f9fe2478d4c3e2233b7a575933c024fcbcb96 /gdbserver
parent334381ea466c4735fe533a9864991b862c094b60 (diff)
downloadgdb-184ea2f7316c54dd5e0fa84f1fe07a222e8fb44c.zip
gdb-184ea2f7316c54dd5e0fa84f1fe07a222e8fb44c.tar.gz
gdb-184ea2f7316c54dd5e0fa84f1fe07a222e8fb44c.tar.bz2
Remove defaulted 'tid' parameter to ptid_t constructor
I wanted to find, and potentially modify, all the spots where the 'tid' parameter to the ptid_t constructor was used. So, I temporarily removed this parameter and then rebuilt. In order to make it simpler to search through the "real" (nonzero) uses of this parameter, something I knew I'd have to do multiple times, I removed any ", 0" from constructor calls. Co-Authored-By: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'gdbserver')
-rw-r--r--gdbserver/linux-low.cc12
-rw-r--r--gdbserver/remote-utils.cc4
-rw-r--r--gdbserver/thread-db.cc2
3 files changed, 9 insertions, 9 deletions
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index fc7a995..d27a216 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -491,7 +491,7 @@ linux_process_target::handle_extended_wait (lwp_info **orig_event_lwp,
struct lwp_info *child_lwp;
struct thread_info *child_thr;
- ptid = ptid_t (new_pid, new_pid, 0);
+ ptid = ptid_t (new_pid, new_pid);
if (debug_threads)
{
@@ -597,7 +597,7 @@ linux_process_target::handle_extended_wait (lwp_info **orig_event_lwp,
"from LWP %ld, new child is LWP %ld\n",
lwpid_of (event_thr), new_pid);
- ptid = ptid_t (pid_of (event_thr), new_pid, 0);
+ ptid = ptid_t (pid_of (event_thr), new_pid);
new_lwp = add_lwp (ptid);
/* Either we're going to immediately resume the new thread
@@ -974,7 +974,7 @@ linux_process_target::create_inferior (const char *program,
add_linux_process (pid, 0);
- ptid = ptid_t (pid, pid, 0);
+ ptid = ptid_t (pid, pid);
new_lwp = add_lwp (ptid);
new_lwp->must_set_ptrace_flags = 1;
@@ -1139,7 +1139,7 @@ linux_process_target::attach (unsigned long pid)
{
struct process_info *proc;
struct thread_info *initial_thread;
- ptid_t ptid = ptid_t (pid, pid, 0);
+ ptid_t ptid = ptid_t (pid, pid);
int err;
proc = add_linux_process (pid, 1);
@@ -1157,7 +1157,7 @@ linux_process_target::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_t (pid, pid, 0));
+ initial_thread = find_thread_ptid (ptid_t (pid, pid));
initial_thread->last_resume_kind = resume_stop;
/* We must attach to every LWP. If /proc is mounted, use that to
@@ -2272,7 +2272,7 @@ linux_process_target::filter_event (int lwpid, int wstat)
"after exec.\n", lwpid);
}
- child_ptid = ptid_t (lwpid, lwpid, 0);
+ child_ptid = ptid_t (lwpid, lwpid);
child = add_lwp (child_ptid);
child->stopped = 1;
current_thread = child->thread;
diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc
index 198a75a..b79c2aa 100644
--- a/gdbserver/remote-utils.cc
+++ b/gdbserver/remote-utils.cc
@@ -581,7 +581,7 @@ read_ptid (const char *buf, const char **obuf)
if (obuf)
*obuf = pp;
- return ptid_t (pid, tid, 0);
+ return ptid_t (pid, tid);
}
/* No multi-process. Just a tid. */
@@ -594,7 +594,7 @@ read_ptid (const char *buf, const char **obuf)
if (obuf)
*obuf = pp;
- return ptid_t (pid, tid, 0);
+ return ptid_t (pid, tid);
}
/* Write COUNT bytes in BUF to the client.
diff --git a/gdbserver/thread-db.cc b/gdbserver/thread-db.cc
index 055a0fa..9a70cdf 100644
--- a/gdbserver/thread-db.cc
+++ b/gdbserver/thread-db.cc
@@ -214,7 +214,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_t (pid, ti_p->ti_lid, 0);
+ ptid_t ptid = ptid_t (pid, ti_p->ti_lid);
struct lwp_info *lwp;
int err;