[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openocd-development
Subject:    [Openocd-development] Breakpoint handling in run_agorithm
From:       dariovecchio () tiscali ! it (Dario Vecchio)
Date:       2008-07-31 22:35:56
Message-ID: 005a01c8f35d$cccffcf0$e207fea9 () MatchPoint
[Download RAW message or body]

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 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic