From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107847 invoked by alias); 21 Apr 2015 09:50:21 -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 107836 invoked by uid 89); 21 Apr 2015 09:50:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f182.google.com Received: from mail-pd0-f182.google.com (HELO mail-pd0-f182.google.com) (209.85.192.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 21 Apr 2015 09:50:19 +0000 Received: by pdea3 with SMTP id a3so237019763pde.3 for ; Tue, 21 Apr 2015 02:50:17 -0700 (PDT) X-Received: by 10.70.38.33 with SMTP id d1mr1854120pdk.99.1429609817719; Tue, 21 Apr 2015 02:50:17 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id qe9sm1470657pbc.62.2015.04.21.02.50.15 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 21 Apr 2015 02:50:16 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v3 07/17] Misc switch_back_to_stepped_thread cleanups References: <1429267521-21047-1-git-send-email-palves@redhat.com> <1429267521-21047-8-git-send-email-palves@redhat.com> Date: Tue, 21 Apr 2015 09:50:00 -0000 In-Reply-To: <1429267521-21047-8-git-send-email-palves@redhat.com> (Pedro Alves's message of "Fri, 17 Apr 2015 11:45:11 +0100") Message-ID: <86iocpzu7n.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00760.txt.bz2 Pedro Alves writes: > Several misc cleanups that prepare the tail end of this function, the > part that actually re-resumes the stepped thread. > > The most non-obvious would be the currently_stepping change, I guess. > That's because it isn't ever correct to pass step=3D1 to target_resume > on software single-step targets, and currently_stepping works at a > conceptual higher level, it returns step=3Dtrue even on software step > targets. It doesn't really matter on hardware step targets, as the > breakpoint will be hit immediately, but it's just wrong on software > step targets. I tested it against my x86 software single-step branch, > and it indeed fixes failed assertions (that catch spurious > PTRACE_SINGLESTEP requests) there. > > gdb/ChangeLog: > 2015-04-17 Pedro Alves > > * infrun.c (switch_back_to_stepped_thread): Use ecs->ptid instead > pf inferior_ptid. If the stepped thread vanished, return 0 ^^ of > instead of resuming here. Use reset_ecs. Print the prev_pc and > the current stop_pc in log message. Clear trap_expected if the > thread advanced. Don't pass currently_stepping to > do_target_resume. --=20 Yao (=E9=BD=90=E5=B0=A7)