public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@linaro.org>
To: Zied Guermazi <zied.guermazi@trande.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH v3 5/7] fix issue: gdb hangs in the command following a commad returning with TARGET_WAITKIND_NO_HISTORY
Date: Thu, 1 Apr 2021 09:18:11 -0300	[thread overview]
Message-ID: <8ff312ae-48db-e27c-3400-0f1c6ec78781@linaro.org> (raw)
In-Reply-To: <20210331025234.518688-6-zied.guermazi@trande.de>

On 3/30/21 11:52 PM, Zied Guermazi wrote:
> 
> This patch fixes an issue observed with btrace when replaying the execution.
> The issue was observed on ARMv7 processors.
> To reproduce the issue, the user 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.
> This fix keeps the same behaviour of gdb as when TARGET_WAITKIND_NO_HISTORY
> is hit on other architectures.
> 
> 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 d22ec8b5976..d4ed6fe0255 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.
> +	(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..9c2522376f2 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 ("setting step over info");
>     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;
>   
> 

I'll defer this to folks more familiar with the infrun code, but this is 
one area that needs to be exercised carefully, as it is really complex 
with many execution paths.

  reply	other threads:[~2021-04-01 12:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31  2:52 [PATCH v3 0/7] extend branch tracing to use ARM CoreSight traces Zied Guermazi
2021-03-31  2:52 ` [PATCH v3 1/7] configure gdb build system for supporting btrace on arm processors Zied Guermazi
2021-03-31  2:52 ` [PATCH v3 2/7] add btrace coresight related commands Zied Guermazi
2021-03-31  6:32   ` Eli Zaretskii
2021-03-31 18:30   ` Luis Machado
2021-03-31 20:24     ` Zied Guermazi
2021-04-01 16:11       ` Luis Machado
2021-03-31  2:52 ` [PATCH v3 3/7] start/stop btrace with coresight etm and parse etm buffer. nat independant Zied Guermazi
2021-03-31 20:23   ` Luis Machado
     [not found]     ` <a78174f9-177f-3757-6b33-d09f38f1fec8@trande.de>
2021-04-01 21:04       ` Zied Guermazi
2021-03-31  2:52 ` [PATCH v3 4/7] start/stop btrace with coresight etm and collect etm buffer on linux os Zied Guermazi
2021-04-01 12:16   ` Luis Machado
2021-04-01 21:57     ` Zied Guermazi
2021-03-31  2:52 ` [PATCH v3 5/7] fix issue: gdb hangs in the command following a commad returning with TARGET_WAITKIND_NO_HISTORY Zied Guermazi
2021-04-01 12:18   ` Luis Machado [this message]
2021-03-31  2:52 ` [PATCH v3 6/7] add support for coresight btrace via remote protocol Zied Guermazi
2021-03-31  6:33   ` Eli Zaretskii
2021-04-01 12:45   ` Luis Machado
2021-04-01 22:58     ` Zied Guermazi
2021-03-31  2:52 ` [PATCH v3 7/7] adapt btrace testcases for arm target Zied Guermazi
2021-04-01 13:34   ` Luis Machado
2021-04-04 19:30     ` Zied Guermazi
2021-04-06 13:09       ` Luis Machado
2021-04-09 19:34         ` Zied Guermazi
2021-04-12 17:11           ` Luis Machado
2021-04-02 16:02 ` [PATCH v3 0/7] extend branch tracing to use ARM CoreSight traces Simon Marchi
2021-04-02 16:05   ` Zied Guermazi
2021-04-05  0:09     ` Simon Marchi
2021-04-05  7:38       ` Zied Guermazi
2021-04-06 16:25         ` Simon Marchi

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=8ff312ae-48db-e27c-3400-0f1c6ec78781@linaro.org \
    --to=luis.machado@linaro.org \
    --cc=gdb-patches@sourceware.org \
    --cc=zied.guermazi@trande.de \
    /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).