]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb, infrun, record: move no-history notification into normal_stop
authorMarkus Metzger <markus.t.metzger@intel.com>
Fri, 15 Jan 2021 16:47:40 +0000 (17:47 +0100)
committerMarkus Metzger <markus.t.metzger@intel.com>
Fri, 13 Sep 2024 10:05:22 +0000 (10:05 +0000)
Leave calling gdb::observers::no_history.notify to normal_stop based on
the last waitstatus.

Reviewed-By: Guinevere Larsen <blarsen@redhat.com>
gdb/infrun.c

index bad42b45a264d9266e4b1b782b20088e12ab7168..743a500595c00a018f60f4f79b8d8cd1108ec776 100644 (file)
@@ -6574,8 +6574,6 @@ handle_inferior_event (struct execution_control_state *ecs)
       if (handle_stop_requested (ecs))
        return;
 
-      interps_notify_no_history ();
-
       /* Cancel an in-flight step-over.  It will not succeed since we
         won't be able to step at the end of the execution history.  */
       {
@@ -9023,7 +9021,6 @@ keep_going_pass_signal (struct execution_control_state *ecs)
   if (ecs->event_thread->control.is_replaying
       && !target_record_is_replaying (ecs->event_thread->ptid))
     {
-      interps_notify_no_history ();
       ecs->ws.set_no_history ();
       set_last_target_status (ecs->target, ecs->ptid, ecs->ws);
       stop_print_frame = true;
@@ -9682,6 +9679,9 @@ normal_stop ()
   if (saved_context.changed ())
     return true;
 
+  if (last.kind () == TARGET_WAITKIND_NO_HISTORY)
+    interps_notify_no_history ();
+
   /* Notify observers about the stop.  This is where the interpreters
      print the stop event.  */
   notify_normal_stop ((inferior_ptid != null_ptid