From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49117 invoked by alias); 18 Aug 2015 12:50:30 -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 48986 invoked by uid 89); 18 Aug 2015 12:50:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 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-f51.google.com Received: from mail-pa0-f51.google.com (HELO mail-pa0-f51.google.com) (209.85.220.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 18 Aug 2015 12:50:28 +0000 Received: by pacgr6 with SMTP id gr6so132329611pac.2 for ; Tue, 18 Aug 2015 05:50:27 -0700 (PDT) X-Received: by 10.66.55.105 with SMTP id r9mr13159847pap.143.1439902226882; Tue, 18 Aug 2015 05:50:26 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id q5sm13899417pdc.65.2015.08.18.05.50.25 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 18 Aug 2015 05:50:26 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/7] Replace "struct continuation" mechanism by something more extensible References: <1439398917-22761-1-git-send-email-palves@redhat.com> <1439398917-22761-3-git-send-email-palves@redhat.com> Date: Tue, 18 Aug 2015 12:50:00 -0000 In-Reply-To: <1439398917-22761-3-git-send-email-palves@redhat.com> (Pedro Alves's message of "Wed, 12 Aug 2015 18:01:52 +0100") Message-ID: <86h9nw3gmp.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-08/txt/msg00463.txt.bz2 Pedro Alves writes: > (tui_init): Install tui_on_normal_stop as normal_stop > * observer. > Remove *. > + > +/* Prepare for a step/next/etc. command. Any target resource > + allocated here is undone in the FSM's clean_up method. */ > + > +static void > +step_command_fsm_prepare (struct step_command_fsm *sm, > + int skip_subroutines, int single_inst, > + int count, int thread) > +{ > + struct thread_info *tp =3D inferior_thread (); Nit: get thread_info by THREAD rather than inferior_thread ()? > + > +/* Implementation of the 'should_stop' FSM method for the finish > + commands. Detects whether the thread stepped out of the function > + successfully, and if so, captures the function's return value and > + marks the FSM finished. */ > + > +static int > +finish_command_fsm_should_stop (struct thread_fsm *self) > { > - struct finish_command_continuation_args *a =3D arg; > + struct finish_command_fsm *f =3D (struct finish_command_fsm *) self; > + struct return_value_info *rv =3D &f->return_value; > + struct thread_info *tp =3D inferior_thread (); Nit: Get TP from f->thread rather than inferior_thread ()? --=20 Yao (=E9=BD=90=E5=B0=A7)