Re: [PATCH v4 3/6] Refactor arm_software_single_step to use regcache.

Yao Qi
2015-12-03T14:37:25Z

Antoine Tremblay <antoine.tremblay@ericsson.com> writes:

> Unfortunately we do for the syscall_next_pc target dependent call.
>
> The reason I did not change syscall_next_pc for regcache is that this
> would require the implementation of a syscall_next_pc that is not
> using the frame unwinders and directly inspects the stack for multiple
> targets.
>
> This would need to be done for arm, mips, nios2, and tix6x.
>
> software_single_step would also have to be adapted for mips, nios2 and
> tix6x for this new api.

We don't need to touch targets other than arm. syscall_next_pc is a
function pointer in struct gdbarch_tdep in arm-tdep.h.

/* Target-dependent structure in gdbarch. */
struct gdbarch_tdep
{
...
/* Return the expected next PC if FRAME is stopped at a syscall
instruction. */
CORE_ADDR (*syscall_next_pc) (struct frame_info *frame);
...
};

we can change frame to regcache.

The indentation looks odd in my mailer, if it is right to you, that is
fine. Maybe, my mailer doesn't show the code format correctly.

--
Yao (齐尧)