Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH 5/9] Switch back to stepped thread: clear step-over info
Date: Tue, 30 Sep 2014 16:33:00 -0000	[thread overview]
Message-ID: <542ADB57.3050506@redhat.com> (raw)
In-Reply-To: <1411691982-10744-6-git-send-email-palves@redhat.com>

On 09/26/2014 01:39 AM, Pedro Alves wrote:
> This path misses clearing the step-over info, because it bypasses
> keep_going.
> 
> The testsuite caught this while I was working on making software
> single-step breakpoints per-thread.  Unfortunately, I didn't keep the
> logs around and I don't recall ATM which test tripped on this.

Got it.  It's schedlock.exp, what else...

Without this, the previous part of the series fails with:

Running /home/pedro/gdb/mygit/build/../src/gdb/testsuite/gdb.threads/schedlock.exp ...
FAIL: gdb.threads/schedlock.exp: step to increment (unlocked 0)
FAIL: gdb.threads/schedlock.exp: step to increment (unlocked 1)
FAIL: gdb.threads/schedlock.exp: step to increment (unlocked 2)
FAIL: gdb.threads/schedlock.exp: step to increment (unlocked 3)
FAIL: gdb.threads/schedlock.exp: step to increment (unlocked 4)
FAIL: gdb.threads/schedlock.exp: step to increment (unlocked 5)
FAIL: gdb.threads/schedlock.exp: step to increment (unlocked 6)
FAIL: gdb.threads/schedlock.exp: step to increment (unlocked 7)
FAIL: gdb.threads/schedlock.exp: step to increment (unlocked 8)
FAIL: gdb.threads/schedlock.exp: step to increment (unlocked 9)
...

> 
> gdb/
> 2014-09-25  Pedro Alves  <palves@redhat.com>
> 
> 	* infrun.c (switch_back_to_stepped_thread) <expect thread advanced
> 	also>: Clear step-over info.
> ---
>  gdb/infrun.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/gdb/infrun.c b/gdb/infrun.c
> index 94a58b2..e0df9bf 100644
> --- a/gdb/infrun.c
> +++ b/gdb/infrun.c
> @@ -5275,6 +5275,13 @@ switch_back_to_stepped_thread (struct execution_control_state *ecs)
>  		fprintf_unfiltered (gdb_stdlog,
>  				    "infrun: expected thread advanced also\n");
>  
> +	      /* Clear this before trying to insert the sss
> +		 breakpoint, in case we were previously trying to step
> +		 over this location in another thread, otherwise the
> +		 breakpoint ends up _not_ installed.  It's what
> +		 keep_going would do too, if we called it.  */
> +	      clear_step_over_info ();
> +
>  	      insert_single_step_breakpoint (get_frame_arch (frame),
>  					     get_frame_address_space (frame),
>  					     stop_pc);
> 


Thanks,
Pedro Alves


  reply	other threads:[~2014-09-30 16:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26  0:39 [PATCH 0/9] software single-step support rework, fix limitations Pedro Alves
2014-09-26  0:39 ` [PATCH 1/9] Decide whether we may have removed breakpoints based on step_over_info Pedro Alves
2014-09-28 12:52   ` Yao Qi
2014-10-02 18:05     ` Pedro Alves
2014-10-06  1:06       ` Yao Qi
2014-10-06  8:42         ` Pedro Alves
2014-09-26  0:39 ` [PATCH 2/9] Rewrite non-continuable watchpoints handling Pedro Alves
2014-09-26  0:40 ` [PATCH 4/9] Remove deprecated_insert_raw_breakpoint and friends Pedro Alves
2014-09-26  0:40 ` [PATCH 3/9] Put single-step breakpoints on the bp_location chain Pedro Alves
2014-09-28 12:36   ` Yao Qi
2014-09-30 13:01     ` Pedro Alves
2014-09-30 13:15       ` Pedro Alves
2014-09-29  6:33   ` Yao Qi
2014-10-02 17:55     ` Pedro Alves
2014-09-26  0:40 ` [PATCH 9/9] Non-stop + software single-step archs: don't force displaced-stepping for all single-steps Pedro Alves
2014-09-26  0:40 ` [PATCH 5/9] Switch back to stepped thread: clear step-over info Pedro Alves
2014-09-30 16:33   ` Pedro Alves [this message]
2014-09-26  0:40 ` [PATCH 8/9] Make single-step breakpoints be per-thread Pedro Alves
2014-09-26  1:18 ` [PATCH 6/9] thread.c: cleanup breakpoint deletion Pedro Alves
2014-09-26  1:36 ` [PATCH 7/9] infrun.c: add for_each_just_stopped_thread Pedro Alves

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=542ADB57.3050506@redhat.com \
    --to=palves@redhat.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