gdb: stop trying to prepare displaced steps for an inferior when it returns _UNAVAILABLE
[deliverable/binutils-gdb.git] / gdb / infrun.c
index 970c151d2cb7a149f79a6aa2df2471f16d57f7e0..c155899ea63a424b015bf5ebb5b3151f4c27b78a 100644 (file)
@@ -1731,6 +1731,7 @@ displaced_step_prepare_throw (thread_info *tp)
                            target_pid_to_str (tp->ptid).c_str ());
 
       global_thread_step_over_chain_enqueue (tp);
+      tp->inf->displaced_step_state.unavailable = true;
 
       return DISPLACED_STEP_PREPARE_STATUS_UNAVAILABLE;
     }
@@ -1920,6 +1921,9 @@ start_step_over (void)
                        "infrun: stealing list of %d threads to step from global queue\n",
                        thread_step_over_chain_length (threads_to_step));
 
+  for (inferior *inf : all_inferiors ())
+    inf->displaced_step_state.unavailable = false;
+
   for (tp = threads_to_step; tp != NULL; tp = next)
     {
       struct execution_control_state ecss;
@@ -1969,6 +1973,12 @@ start_step_over (void)
       if (!target_is_non_stop_p () && !step_what)
        continue;
 
+      if (tp->inf->displaced_step_state.unavailable)
+       {
+         global_thread_step_over_chain_enqueue (tp);
+         continue;
+       }
+
       switch_to_thread (tp);
       reset_ecs (ecs, tp);
       keep_going_pass_signal (ecs);
This page took 0.026172 seconds and 4 git commands to generate.