cortexa: Check for fault on set/clear soft breakpoint.
This commit is contained in:
parent
eaaa7d2cc2
commit
259f1b90df
|
@ -665,11 +665,11 @@ static int cortexa_breakwatch_set(target *t, struct breakwatch *bw)
|
||||||
case 2:
|
case 2:
|
||||||
bw->reserved[0] = target_mem_read16(t, bw->addr);
|
bw->reserved[0] = target_mem_read16(t, bw->addr);
|
||||||
target_mem_write16(t, bw->addr, 0xBE00);
|
target_mem_write16(t, bw->addr, 0xBE00);
|
||||||
return 0;
|
return target_check_error(t);
|
||||||
case 4:
|
case 4:
|
||||||
bw->reserved[0] = target_mem_read32(t, bw->addr);
|
bw->reserved[0] = target_mem_read32(t, bw->addr);
|
||||||
target_mem_write32(t, bw->addr, 0xE1200070);
|
target_mem_write32(t, bw->addr, 0xE1200070);
|
||||||
return 0;
|
return target_check_error(t);
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -711,10 +711,10 @@ static int cortexa_breakwatch_clear(target *t, struct breakwatch *bw)
|
||||||
switch (bw->size) {
|
switch (bw->size) {
|
||||||
case 2:
|
case 2:
|
||||||
target_mem_write16(t, bw->addr, i);
|
target_mem_write16(t, bw->addr, i);
|
||||||
return 0;
|
return target_check_error(t);
|
||||||
case 4:
|
case 4:
|
||||||
target_mem_write32(t, bw->addr, i);
|
target_mem_write32(t, bw->addr, i);
|
||||||
return 0;
|
return target_check_error(t);
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue