Highspeed single stepping on Cortex-A9

Hi,

i was wondering if there is a way to speed up the single stepping function static int cortex_a8_step(struct target *target, int current, uint32_t address, int handle_breakpoints) in /src/target/cortex_a.c (OpenOCD 0.7.0).

This function has to be used to leave a breakpoint, because static int cortex_a8_resume(struct target *target, int current, uint32_t address, int handle_breakpoints, int debug_execution) can’t step over the currently active breakpoint.

cortex_a8_step has the following behavior. It

  • - deletes the current BP,
  • - adds a temporary BP on the following instruction,
  • - resumes to the temporary BP,
  • - deletes the temporary BP and
  • - restores the original BP.
  • This behavior is quite slow, because every time a breakpoint hits, openocd loads the full system state, which takes a long time.

    Is there any way, to do all this faster? I was able to speed up continuing from BP by the factor 2, using alternating BP addresses. This works because deleting and setting a BP is quite fast.

    Best regards

    Lars

    The cortexa still needs some work, i do not have any hardware so it is very low on my list.

    If i recall we did something similar on the cortexm - see armv7m_maybe_skip_bkpt_inst.

    You may be better posting this to the dev mailing list.

    Cheers

    Spen