[PATCH 2/7] Replace "struct continuation" mechanism by something more extensible
Yao Qi
qiyaoltc@gmail.com
Tue Aug 18 12:50:00 GMT 2015
Pedro Alves <palves@redhat.com> 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 = 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 = arg;
> + struct finish_command_fsm *f = (struct finish_command_fsm *) self;
> + struct return_value_info *rv = &f->return_value;
> + struct thread_info *tp = inferior_thread ();
Nit: Get TP from f->thread rather than inferior_thread ()?
--
Yao (齐尧)
More information about the Gdb-patches
mailing list