[PATCH] finish-reverse fix for setting break on correct entry point when executing in reverse.
Ulrich Weigand
Ulrich.Weigand@de.ibm.com
Mon Aug 16 12:09:01 GMT 2021
"Carl Love" <cel@us.ibm.com> wrote on 05.08.2021 01:51:56:
> So, I was able to exercise the code but it actually took two finish
> commands to get to where I was supposed to be. So, this doesn't really
> work as desired for the global entry case.
>
> Seems like we need to remember if we are doing a finish command and
> than check when we stop if we are still in the function.
It seems to me this is exactly what I was mentioning in my email
as of 07/27, this has to be handled in the infrun state machine
in process_event_stop_test. Quoting from that email:
>If you need to use the step-resume breakpoint, you'll still need to
>step after that breakpoint is hit. This is currently being done in
>the state machine handling in process_event_stop_test, case
>BPSTAT_WHAT_STEP_RESUME:
> if (ecs->event_thread->control.proceed_to_finish
> && execution_direction == EXEC_REVERSE)
> {
> struct thread_info *tp = ecs->event_thread;
>
> /* We are finishing a function in reverse, and just hit the
> step-resume breakpoint at the start address of the
> function, and we're almost there -- just need to back up
> by one more single-step, which should take us back to the
> function call. */
> tp->control.step_range_start = tp->control.step_range_end = 1;
> keep_going (ecs);
> return;
> }
>
>
>Again, the only required change here is to set up the step range
>properly.
Did you implement this change?
Bye,
Ulrich
More information about the Gdb-patches
mailing list