From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9033 invoked by alias); 30 Sep 2014 16:33:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 9021 invoked by uid 89); 30 Sep 2014 16:33:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 30 Sep 2014 16:33:35 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8UGXX3j003820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 30 Sep 2014 12:33:34 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8UGXSfc024559 for ; Tue, 30 Sep 2014 12:33:29 -0400 Message-ID: <542ADB57.3050506@redhat.com> Date: Tue, 30 Sep 2014 16:33:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH 5/9] Switch back to stepped thread: clear step-over info References: <1411691982-10744-1-git-send-email-palves@redhat.com> <1411691982-10744-6-git-send-email-palves@redhat.com> In-Reply-To: <1411691982-10744-6-git-send-email-palves@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-09/txt/msg00907.txt.bz2 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 > > * infrun.c (switch_back_to_stepped_thread) 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