hla: fix watchpoints not being set
Watchpoints were not being enabled when the hl adapter target was resumed. This effects both stlink and icdi interfaces. Change-Id: Ia9f8a9415be97a467cd099b63b6bc9f7f37d0c0d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/931 Tested-by: jenkins
This commit is contained in:
parent
bd1502eb0f
commit
561984c8f6
|
@ -677,7 +677,7 @@ static int cortex_m3_soft_reset_halt(struct target *target)
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cortex_m3_enable_breakpoints(struct target *target)
|
void cortex_m3_enable_breakpoints(struct target *target)
|
||||||
{
|
{
|
||||||
struct breakpoint *breakpoint = target->breakpoints;
|
struct breakpoint *breakpoint = target->breakpoints;
|
||||||
|
|
||||||
|
|
|
@ -194,6 +194,7 @@ int cortex_m3_set_watchpoint(struct target *target, struct watchpoint *watchpoin
|
||||||
int cortex_m3_unset_watchpoint(struct target *target, struct watchpoint *watchpoint);
|
int cortex_m3_unset_watchpoint(struct target *target, struct watchpoint *watchpoint);
|
||||||
int cortex_m3_add_watchpoint(struct target *target, struct watchpoint *watchpoint);
|
int cortex_m3_add_watchpoint(struct target *target, struct watchpoint *watchpoint);
|
||||||
int cortex_m3_remove_watchpoint(struct target *target, struct watchpoint *watchpoint);
|
int cortex_m3_remove_watchpoint(struct target *target, struct watchpoint *watchpoint);
|
||||||
|
void cortex_m3_enable_breakpoints(struct target *target);
|
||||||
void cortex_m3_enable_watchpoints(struct target *target);
|
void cortex_m3_enable_watchpoints(struct target *target);
|
||||||
void cortex_m3_dwt_setup(struct cortex_m3_common *cm3, struct target *target);
|
void cortex_m3_dwt_setup(struct cortex_m3_common *cm3, struct target *target);
|
||||||
|
|
||||||
|
|
|
@ -551,6 +551,12 @@ static int adapter_resume(struct target *target, int current,
|
||||||
return ERROR_TARGET_NOT_HALTED;
|
return ERROR_TARGET_NOT_HALTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!debug_execution) {
|
||||||
|
target_free_all_working_areas(target);
|
||||||
|
cortex_m3_enable_breakpoints(target);
|
||||||
|
cortex_m3_enable_watchpoints(target);
|
||||||
|
}
|
||||||
|
|
||||||
pc = armv7m->arm.pc;
|
pc = armv7m->arm.pc;
|
||||||
if (!current) {
|
if (!current) {
|
||||||
buf_set_u32(pc->value, 0, 32, address);
|
buf_set_u32(pc->value, 0, 32, address);
|
||||||
|
|
Loading…
Reference in New Issue