gdb: use two displaced step buffers on amd64-linux
[deliverable/binutils-gdb.git] / gdb / infrun.c
index 17c342be50971433ad82a36e84be7dad2f8a97f2..284353004d99baa61a6592d2651b5c57544f9761 100644 (file)
@@ -1269,6 +1269,8 @@ follow_exec (ptid_t ptid, const char *exec_file_target)
      to symbol_file_command...).  */
   insert_breakpoints ();
 
+  gdb::observers::inferior_execd.notify (inf);
+
   /* The next resume of this inferior should bring it to the shlib
      startup breakpoints.  (If the user had also set bp's on
      "main" from the old (parent) process, then they'll auto-
@@ -1748,6 +1750,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;
     }
@@ -1937,6 +1940,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;
@@ -1986,6 +1992,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.023998 seconds and 4 git commands to generate.