public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Zied Guermazi <zied.guermazi@trande.de>
To: gdb-patches@sourceware.org
Cc: Zied Guermazi <zied.guermazi@trande.de>
Subject: [PATCH 5/8] fix issue: gdb hangs in the command following a commad returning with TARGET_WAITKIND_NO_HISTORY
Date: Fri, 26 Feb 2021 03:45:59 +0100	[thread overview]
Message-ID: <20210226024602.55057-6-zied.guermazi@trande.de> (raw)
In-Reply-To: <20210226024602.55057-1-zied.guermazi@trande.de>

This patch fixes an issue observed with btrace when replaying the execution.
The issue was observed on ARMv7 processors.
To reproduce the issue needs to replay in forward direction 
until he reaches the end of history, then replay backwards 
(e.g a reverse-next) and then replay forwards. gdb hangs and the user
can not issue new commands.

gdb/ChangeLog

	* infrun.c (set_step_over_info): add debug print.
	(handle_inferior_event): clear step over info 
	in case TARGET_WAITKIND_NO_HISTORY

---
 gdb/ChangeLog | 6 ++++++
 gdb/infrun.c  | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a84671bf344..15dee4eb29b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2021-02-25  Zied Guermazi  <zied.guermazi@trande.de>
+
+	* infrun.c (set_step_over_info): add debug print.
+	* infrun.c (handle_inferior_event): clear step over info.
+	in case TARGET_WAITKIND_NO_HISTORY
+
 2021-02-25  Zied Guermazi  <zied.guermazi@trande.de>
 
 	* nat/linux-btrace.h (btrace_tinfo_etm): New.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index a271220b261..a483307d7a3 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1308,6 +1308,7 @@ set_step_over_info (const address_space *aspace, CORE_ADDR address,
 		    int nonsteppable_watchpoint_p,
 		    int thread)
 {
+  infrun_debug_printf ("infrun: set_step_over_info\n");
   step_over_info.aspace = aspace;
   step_over_info.address = address;
   step_over_info.nonsteppable_watchpoint_p = nonsteppable_watchpoint_p;
@@ -5536,7 +5537,7 @@ handle_inferior_event (struct execution_control_state *ecs)
       delete_just_stopped_threads_single_step_breakpoints ();
       ecs->event_thread->suspend.stop_pc
 	= regcache_read_pc (get_thread_regcache (inferior_thread ()));
-
+      clear_step_over_info ();
       if (handle_stop_requested (ecs))
 	return;
 
-- 
2.25.1


  parent reply	other threads:[~2021-02-26  2:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26  2:45 [PATCH 0/8] extend branch tracing to use ARM CoreSight traces Zied Guermazi
2021-02-26  2:45 ` [PATCH 1/8] configure gdb build system for supporting btrace on arm processors Zied Guermazi
2021-03-04 16:35   ` Metzger, Markus T
2021-03-10 22:09     ` Zied Guermazi
2021-02-26  2:45 ` [PATCH 2/8] add btrace coresight related commands Zied Guermazi
2021-03-04 16:35   ` Metzger, Markus T
     [not found]     ` <8a71a9a3-ad14-b716-6d86-ece063061b02@trande.de>
2021-03-10 22:37       ` Zied Guermazi
2021-03-16 10:16         ` Metzger, Markus T
2021-03-19 15:21           ` Zied Guermazi
2021-02-26  2:45 ` [PATCH 3/8] start/stop btrace with coresight etm and parse etm buffer. nat independant Zied Guermazi
2021-03-04 16:35   ` Metzger, Markus T
2021-03-11  0:12     ` Zied Guermazi
2021-03-16 10:16       ` Metzger, Markus T
2021-03-19 15:29         ` Zied Guermazi
2021-03-29 14:01           ` Metzger, Markus T
2021-03-30 15:11             ` Zied Guermazi
2021-02-26  2:45 ` [PATCH 4/8] start/stop btrace with coresight etm and collect etm buffer on linux os Zied Guermazi
2021-02-26  2:45 ` Zied Guermazi [this message]
2021-02-26  7:12   ` [PATCH 5/8] fix issue: gdb hangs in the command following a commad returning with TARGET_WAITKIND_NO_HISTORY Aktemur, Tankut Baris
2021-03-10 20:39     ` Zied Guermazi
2021-02-26  2:46 ` [PATCH 6/8] add support for coresight btrace via remote protocol Zied Guermazi
2021-02-26  2:46 ` [PATCH 7/8] adapt btrace testcases for arm target Zied Guermazi
2021-02-26  2:46 ` [PATCH 8/8] document btrace support for arm targets using coresight etm traces Zied Guermazi
2021-02-26  7:36   ` Eli Zaretskii
2021-03-10 20:36     ` Zied Guermazi

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=20210226024602.55057-6-zied.guermazi@trande.de \
    --to=zied.guermazi@trande.de \
    --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).