[PATCH v3 3/4] gdb, infrun, record: move no-history notification into normal_stop
Markus Metzger
markus.t.metzger@intel.com
Mon Jul 4 11:54:06 GMT 2022
Leave calling gdb::observers::no_history.notify to normal_stop based on
the last waitstatus.
---
gdb/infrun.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 3fa262efb01..2e42d3663a7 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -5875,8 +5875,6 @@ handle_inferior_event (struct execution_control_state *ecs)
if (handle_stop_requested (ecs))
return;
- gdb::observers::no_history.notify ();
-
/* 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. */
{
@@ -8184,7 +8182,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))
{
- gdb::observers::no_history.notify ();
ecs->ws.set_no_history ();
set_last_target_status (ecs->target, ecs->ptid, ecs->ws);
stop_print_frame = true;
@@ -8808,6 +8805,9 @@ normal_stop (void)
if (saved_context.changed ())
return 1;
+ if (last.kind () == TARGET_WAITKIND_NO_HISTORY)
+ gdb::observers::no_history.notify ();
+
/* Notify observers about the stop. This is where the interpreters
print the stop event. */
if (inferior_ptid != null_ptid)
--
2.35.3
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
More information about the Gdb-patches
mailing list