This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/9] Decide whether we may have removed breakpoints based on step_over_info
- From: Yao Qi <yao at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Sun, 28 Sep 2014 20:48:10 +0800
- Subject: Re: [PATCH 1/9] Decide whether we may have removed breakpoints based on step_over_info
- Authentication-results: sourceware.org; auth=none
- References: <1411691982-10744-1-git-send-email-palves at redhat dot com> <1411691982-10744-2-git-send-email-palves at redhat dot com>
Pedro Alves <palves@redhat.com> writes:
> gdb/
> 2014-09-22 Pedro Alves <palves@redhat.com>
>
> * infrun.c (step_over_info_valid_p): New function.
> (resume): Use step_over_info_valid_p instead of checking the
> threads's trap_expected flag. Add debug output.
^^^^^^^^^^^^^^^^
I don't see any debug output added by the code. Maybe a staled changelog entry?
> +/* Returns true if step-over info is valid. */
> +
> +static int
> +step_over_info_valid_p (void)
> +{
> + return (step_over_info.aspace != NULL);
> +}
> +
How about replace "step_over_info.aspace != NULL" in
stepping_past_instruction_at with step_over_info_valid_p too?
> /* Advise target which signals may be handled silently. If we have
> - removed breakpoints because we are stepping over one (which can
> - happen only if we are not using displaced stepping), we need to
> + removed breakpoints because we are stepping over one, we need to
> receive all signals to avoid accidentally skipping a breakpoint
> during execution of a signal handler. */
> - if ((step || singlestep_breakpoints_inserted_p)
> - && tp->control.trap_expected
> - && !use_displaced_stepping (gdbarch))
> + if (step_over_info_valid_p ())
Why do we remove condition (step || singlestep_breakpoints_inserted_p)?
I understand that step_over_info_valid_p is equivalent to
"tp->control.trap_expected && !use_displaced_stepping (gdbarch)", so I
don't know why (step || singlestep_breakpoints_inserted_p) is removed
too.
> target_pass_signals (0, NULL);
> else
> target_pass_signals ((int) GDB_SIGNAL_LAST, signal_pass);
--
Yao (éå)