From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20732 invoked by alias); 21 Apr 2015 11:09:07 -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 20721 invoked by uid 89); 21 Apr 2015 11:09:07 -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-pa0-f53.google.com Received: from mail-pa0-f53.google.com (HELO mail-pa0-f53.google.com) (209.85.220.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 21 Apr 2015 11:09:06 +0000 Received: by pabsx10 with SMTP id sx10so237958852pab.3 for ; Tue, 21 Apr 2015 04:09:04 -0700 (PDT) X-Received: by 10.68.97.131 with SMTP id ea3mr36162826pbb.165.1429614544473; Tue, 21 Apr 2015 04:09:04 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id y2sm1708727pbt.46.2015.04.21.04.09.01 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 21 Apr 2015 04:09:03 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v3 10/17] Implement all-stop on top of a target running non-stop mode References: <1429267521-21047-1-git-send-email-palves@redhat.com> <1429267521-21047-11-git-send-email-palves@redhat.com> Date: Tue, 21 Apr 2015 11:09:00 -0000 In-Reply-To: <1429267521-21047-11-git-send-email-palves@redhat.com> (Pedro Alves's message of "Fri, 17 Apr 2015 11:45:14 +0100") Message-ID: <86a8y1zqkd.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/msg00762.txt.bz2 Pedro Alves writes: > gdb/ChangeLog: > 2015-04-17 Pedro Alves > > * NEWS: Mention "maint set/show target-non-stop". > * breakpoint.c (update_global_location_list): Check > target_is_non_stop_p instead of non_stop. > * infcmd.c (attach_command_post_wait, attach_command): Likewise. > * infrun.c (show_can_use_displaced_stepping) > (can_use_displaced_stepping_p, start_step_over_inferior): > Likewise. > (resume): Always resume a single thread if the target is in > non-stop mode. > (proceed): Check target_is_non_stop_p instead of non_stop. If in > all-mode but the target is always in non-stop mode, start all the ^^^^^^^^ all-stop mode. > (handle_signal_stop) : If we get a signal while > stepping over a breakpoint, and the target is always in non-stop > mode, restart all threads. > @@ -5614,6 +5666,17 @@ handle_signal_stop (struct execution_control_state= *ecs) > /* Reset trap_expected to ensure breakpoints are re-inserted. */ > ecs->event_thread->control.trap_expected =3D 0; >=20=20 > + if (!non_stop && target_is_non_stop_p ()) > + { This path is about the case that a signal is got while in in-line stepping, isn't? If so, non_stop should be an invariant false. We don't need to check it. > + keep_going (ecs); > + > + /* We've canceled the step-over temporarily while the > + signal handler executes. Let other threads run, > + according to schedlock. */ IMO, we don't need to run other threads according to schedlock. GDB resumes some threads here and operations should be invisible to user, schedlock, as a user visible option, shouldn't affect what threads should be resumed. On the other hand, restart_threads is to undo the changes done by stop_all_threads, so no user preference (schedlock) should be considered here. > + restart_threads (ecs->event_thread); > + return; > + } > + --=20 Yao (=E9=BD=90=E5=B0=A7)