* remote.c (remote_threads_extra_info): Don't query the remote
authorPedro Alves <palves@redhat.com>
Thu, 24 Jul 2008 15:28:42 +0000 (15:28 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 24 Jul 2008 15:28:42 +0000 (15:28 +0000)
server about info on the internally added main thread.

gdb/ChangeLog
gdb/remote.c

index 82dbd52360f51c040a894c1cada840ed3faea5a1..735d58c1ae8093738d133fdb7fbf35ed2aee3e9c 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-24  Pedro Alves  <pedro@codesourcery.com>
+
+       * remote.c (remote_threads_extra_info): Don't query the remote
+       server about info on the internally added main thread.
+
 2008-07-24  Aleksandar Ristovski  <aristovski@qnx.com>
 
        * nto-procfs.c (procfs_attach): Populate initial thread list.
index 14e04da7ba9711309520b3f6ec921cff2a28c220..2e626a9ddc56d509ce8210a21826353f94d4f668 100644 (file)
@@ -2042,6 +2042,12 @@ remote_threads_extra_info (struct thread_info *tp)
     internal_error (__FILE__, __LINE__,
                    _("remote_threads_extra_info"));
 
+  if (ptid_equal (tp->ptid, magic_null_ptid)
+      || (ptid_get_pid (tp->ptid) != 0 && ptid_get_tid (tp->ptid) == 0))
+    /* This is the main thread which was added by GDB.  The remote
+       server doesn't know about it.  */
+    return NULL;
+
   if (use_threadextra_query)
     {
       xsnprintf (rs->buf, get_remote_packet_size (), "qThreadExtraInfo,%lx",