Hi Magnus,

I see another problem if we are not lucky and an existing application 
breakpoint is exactly at the 
same address of the temporary breakpoint used by the algorithm.

As breakpoints are stored with respect to their address here is what happens:

> b) Add the temporary breakpoint used by the algorithm
> breakpoint_add(target, exit_point, exit_breakpoint_size, BKPT_HARD))
> in  armv4_5_run_algorithm

Here we are not really adding a new breakpoint as the address is the same.

> e) Unset and Remove the temporary  breakpoint
> breakpoint_remove(target, exit_point) called from  armv4_5_run_algorithm

Here we are removing the (unlucky) application breakpoint.

> f) Enable all
> breakpoints

All but the one we have removed.

> One solution is to first unset all breakpoints, then save the watchpoint
> and breakpoint list pointers  and the arm7_9->wp_available to temporary
> variables in the algoritm code (and be careful hove to restore stuff on
> errors)

Yes, the backup/restore of the whole list should work

Regards,

            Dario 

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to