OSDN Git Service

2012-01-13 Pedro Alves <palves@redhat.com>
authorpalves <palves>
Fri, 13 Jan 2012 20:06:40 +0000 (20:06 +0000)
committerpalves <palves>
Fri, 13 Jan 2012 20:06:40 +0000 (20:06 +0000)
* server.c (attach_inferior): Clear `cont_thread'.

gdb/gdbserver/ChangeLog
gdb/gdbserver/server.c

index 89a4cdd..14950fb 100644 (file)
@@ -1,5 +1,9 @@
 2012-01-13  Pedro Alves  <palves@redhat.com>
 
+       * server.c (attach_inferior): Clear `cont_thread'.
+
+2012-01-13  Pedro Alves  <palves@redhat.com>
+
        * server.c (main): Avoid infinite loop while detaching/killing
        after a longjmp.
 
index f312a5c..bebccf5 100644 (file)
@@ -338,6 +338,10 @@ attach_inferior (int pid)
      whichever we were told to attach to.  */
   signal_pid = pid;
 
+  /* Clear this so the backend doesn't get confused, thinking
+     CONT_THREAD died, and it needs to resume all threads.  */
+  cont_thread = null_ptid;
+
   if (!non_stop)
     {
       last_ptid = mywait (pid_to_ptid (pid), &last_status, 0, 0);