From: Markus Metzger Date: Fri, 15 Jan 2021 16:47:40 +0000 (+0100) Subject: gdb, infrun, record: move no-history notification into normal_stop X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d230d066b2f7616a4add0e9345600b59fa1207e1;p=thirdparty%2Fbinutils-gdb.git gdb, infrun, record: move no-history notification into normal_stop Leave calling gdb::observers::no_history.notify to normal_stop based on the last waitstatus. Reviewed-By: Guinevere Larsen --- diff --git a/gdb/infrun.c b/gdb/infrun.c index bad42b45a26..743a500595c 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -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