summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/remote-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r--gdb/gdbserver/remote-utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 05563bea7e6..10cb6645ecc 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -573,9 +573,10 @@ read_ptid (char *buf, char **obuf)
/* No multi-process. Just a tid. */
tid = hex_or_minus_one (p, &pp);
- /* Since the stub is not sending a process id, then default to
- what's in the current inferior. */
- pid = ptid_get_pid (current_ptid);
+ /* Since GDB is not sending a process id (multi-process extensions
+ are off), then there's only one process. Default to the first in
+ the list. */
+ pid = pid_of (get_first_process ());
if (obuf)
*obuf = pp;