2011-09-05 Pedro Alves <pedro@codesourcery.com>
authorPedro Alves <palves@redhat.com>
Mon, 5 Sep 2011 15:46:34 +0000 (15:46 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 5 Sep 2011 15:46:34 +0000 (15:46 +0000)
PR cli/13110

* infrun.c (fetch_inferior_event): Check if there's a selected
thread before checking if the selected thread is executing.

gdb/ChangeLog
gdb/infrun.c

index 9f06267e3b08a667a530a9f507d3d7280a3823d4..80fc4067a85ae7129b3fb800eaa6a7cd6fe72bf2 100644 (file)
@@ -1,3 +1,10 @@
+2011-09-05  Pedro Alves  <pedro@codesourcery.com>
+
+       PR cli/13110
+
+       * infrun.c (fetch_inferior_event): Check if there's a selected
+       thread before checking if the selected thread is executing.
+
 2011-09-05  Pedro Alves  <pedro@codesourcery.com>
 
        * inf-loop.c (execute_command): Don't check if the current thread
index fee302c5eef944cc80c527b2265c0b2a0ebc7834..8846cdf1a1c12eb5d6ddd17927495d064fef019a 100644 (file)
@@ -2749,7 +2749,9 @@ fetch_inferior_event (void *client_data)
      switches threads anyway).  If we didn't do this, a spurious
      delayed event in all-stop mode would make the user lose the
      selected frame.  */
-  if (non_stop || is_executing (inferior_ptid))
+  if (non_stop
+      || (!ptid_equal (inferior_ptid, null_ptid)
+         && is_executing (inferior_ptid)))
     registers_changed ();
 
   make_cleanup_restore_integer (&execution_direction);