cortexa: Check for fault on set/clear soft breakpoint.

This commit is contained in:
Gareth McMullin 2017-09-20 11:16:36 +12:00
parent eaaa7d2cc2
commit 259f1b90df
1 changed files with 4 additions and 4 deletions

View File

@ -665,11 +665,11 @@ static int cortexa_breakwatch_set(target *t, struct breakwatch *bw)
case 2:
bw->reserved[0] = target_mem_read16(t, bw->addr);
target_mem_write16(t, bw->addr, 0xBE00);
return 0;
return target_check_error(t);
case 4:
bw->reserved[0] = target_mem_read32(t, bw->addr);
target_mem_write32(t, bw->addr, 0xE1200070);
return 0;
return target_check_error(t);
default:
return -1;
}
@ -711,10 +711,10 @@ static int cortexa_breakwatch_clear(target *t, struct breakwatch *bw)
switch (bw->size) {
case 2:
target_mem_write16(t, bw->addr, i);
return 0;
return target_check_error(t);
case 4:
target_mem_write32(t, bw->addr, i);
return 0;
return target_check_error(t);
default:
return -1;
}