2008-07-24 Pedro Alves * remote.c (remote_threads_extra_info): Don't query the remote server about info on the internally added main thread. --- gdb/remote.c | 6 ++++++ 1 file changed, 6 insertions(+) Index: src/gdb/remote.c =================================================================== --- src.orig/gdb/remote.c 2008-07-12 18:52:38.000000000 +0100 +++ src/gdb/remote.c 2008-07-24 15:47:42.000000000 +0100 @@ -2042,6 +2042,12 @@ remote_threads_extra_info (struct thread 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",