aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-12-12 00:12:03 +0000
committerPedro Alves <palves@redhat.com>2008-12-12 00:12:03 +0000
commitca19bf23094735e554d7101913b42a2d71fce1e5 (patch)
tree4090bb28b9dbe5503db717fbe1760eb23996267b /gdb
parent827e6013f1f83f85b2a5b26c8d0fc007aba77750 (diff)
downloadgdb-ca19bf23094735e554d7101913b42a2d71fce1e5.zip
gdb-ca19bf23094735e554d7101913b42a2d71fce1e5.tar.gz
gdb-ca19bf23094735e554d7101913b42a2d71fce1e5.tar.bz2
* remote.c (read_ptid): If we don't know about any inferior yet,
use the pid of magic_null_ptid. (remote_start_remote): In the non-stop mode case, don't set inferior_ptid to magic_null_ptid here.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/remote.c16
2 files changed, 14 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 68016e1..8828900 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2008-12-12 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (read_ptid): If we don't know about any inferior yet,
+ use the pid of magic_null_ptid.
+ (remote_start_remote): In the non-stop mode case, don't set
+ inferior_ptid to magic_null_ptid here.
+
2008-12-11 Daniel Jacobowitz <dan@codesourcery.com>
Pedro Alves <pedro@codesourcery.com>
diff --git a/gdb/remote.c b/gdb/remote.c
index f1fb875..9af9efe 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1527,8 +1527,13 @@ read_ptid (char *buf, char **obuf)
pp = unpack_varlen_hex (p, &tid);
/* Since the stub is not sending a process id, then default to
- what's in inferior_ptid. */
- pid = ptid_get_pid (inferior_ptid);
+ what's in inferior_ptid, unless it's null at this point. If so,
+ then since there's no way to know the pid of the reported
+ threads, use the magic number. */
+ if (ptid_equal (inferior_ptid, null_ptid))
+ pid = ptid_get_pid (magic_null_ptid);
+ else
+ pid = ptid_get_pid (inferior_ptid);
if (obuf)
*obuf = pp;
@@ -2576,13 +2581,6 @@ remote_start_remote (struct ui_out *uiout, void *opaque)
controlling. We default to adding them in the running state.
The '?' query below will then tell us about which threads are
stopped. */
-
- /* If we're not using the multi-process extensions, there's no
- way to know the pid of the reported threads; use the magic
- number. */
- if (!remote_multi_process_p (rs))
- inferior_ptid = magic_null_ptid;
-
remote_threads_info ();
}
else if (rs->non_stop_aware)