Re: [PATCH v2 06/23] Make thread_still_needs_step_over consider stepping_over_watchpoint too

Yao Qi
2015-04-08T09:28:21Z

Pedro Alves <palves@redhat.com> writes:

> +static int
> +thread_still_needs_step_over (struct thread_info *tp)
> +{
> + struct inferior *inf = find_inferior_ptid (tp->ptid);

'inf' isn't used.

> @@ -6327,6 +6357,8 @@ keep_going (struct execution_control_state *ecs)
> else
> clear_step_over_info ();
>
> + ecs->event_thread->control.trap_expected = (remove_bp || remove_wps);
> +
> /* Stop stepping if inserting breakpoints fails. */
> TRY
> {
> @@ -6341,8 +6373,6 @@ keep_going (struct execution_control_state *ecs)
> }
> END_CATCH
>
> - ecs->event_thread->control.trap_expected = (remove_bp || remove_wps);
> -

Why do we hoist this line in front of the TRY/CATCH block? because we
want to set control.trap_expected before insert_breakpoints which may
throw exception? We need a ChangeLog entry for it.

--
Yao (齐尧)