- trying to remove a breakpoint with target running should not exit(-1) from OpenOCD
git-svn-id: svn://svn.berlios.de/openocd/trunk@189 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
9061c08aa7
commit
835e6440b8
|
@ -224,8 +224,17 @@ int watchpoint_remove(target_t *target, u32 address)
|
||||||
{
|
{
|
||||||
if ((retval = target->type->remove_watchpoint(target, watchpoint)) != ERROR_OK)
|
if ((retval = target->type->remove_watchpoint(target, watchpoint)) != ERROR_OK)
|
||||||
{
|
{
|
||||||
ERROR("BUG: can't remove watchpoint");
|
switch (retval)
|
||||||
exit(-1);
|
{
|
||||||
|
case ERROR_TARGET_NOT_HALTED:
|
||||||
|
INFO("can't remove watchpoint while target is running");
|
||||||
|
return retval;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ERROR("unknown error");
|
||||||
|
exit(-1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
(*watchpoint_p) = watchpoint->next;
|
(*watchpoint_p) = watchpoint->next;
|
||||||
free(watchpoint);
|
free(watchpoint);
|
||||||
|
|
Loading…
Reference in New Issue