From: Markus Metzger <markus.t.metzger@intel.com>
To: gdb-patches@sourceware.org
Subject: [PATCH v4 3/4] gdb, infrun, record: move no-history notification into normal_stop
Date: Tue, 12 Mar 2024 11:34:22 +0000 [thread overview]
Message-ID: <20240312113423.3543956-4-markus.t.metzger@intel.com> (raw)
In-Reply-To: <20240312113423.3543956-1-markus.t.metzger@intel.com>
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 eb5164b4066..f92f529412f 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -6538,8 +6538,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. */
{
@@ -9002,7 +9000,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;
@@ -9642,6 +9639,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
--
2.34.1
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
next prev parent reply other threads:[~2024-03-12 11:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-12 11:34 [PATCH v4 0/4] btrace: infrun fixes Markus Metzger
2024-03-12 11:34 ` [PATCH v4 1/4] gdb, infrun, btrace: fix reverse/replay stepping at end of execution history Markus Metzger
2024-03-12 11:56 ` Hannes Domani
2024-03-13 11:47 ` Hannes Domani
2024-04-04 18:03 ` Guinevere Larsen
2024-04-05 9:12 ` Metzger, Markus T
2024-04-05 12:53 ` Guinevere Larsen
2024-03-12 11:34 ` [PATCH v4 2/4] gdb, infrun, record: fix hang when step-over fails with no-history Markus Metzger
2024-04-04 18:27 ` Guinevere Larsen
2024-03-12 11:34 ` Markus Metzger [this message]
2024-04-04 18:57 ` [PATCH v4 3/4] gdb, infrun, record: move no-history notification into normal_stop Guinevere Larsen
2024-04-05 9:16 ` Metzger, Markus T
2024-04-05 15:51 ` Guinevere Larsen
2024-03-12 11:34 ` [PATCH v4 4/4] gdb, infrun: fix multi-threaded reverse stepping Markus Metzger
2024-04-03 20:27 ` Guinevere Larsen
2024-04-09 9:14 ` Metzger, Markus T
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240312113423.3543956-4-markus.t.metzger@intel.com \
--to=markus.t.metzger@intel.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).