The ibcr count for hw instruction breakpoint registers is decremented
with soft breakpoints and breakpoint length error.
This fixes this.
---
Index: src/target/xscale.c
===================================================================
--- src/target/xscale.c (revision 1214)
+++ src/target/xscale.c (working copy)
@@ -2262,10 +2262,6 @@
LOG_INFO("no breakpoint unit available for hardware
breakpoint");
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
}
- else
- {
- xscale->ibcr_available--;
- }
if ((breakpoint->length != 2) && (breakpoint->length != 4))
{
@@ -2273,6 +2269,11 @@
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
}
+ if (breakpoint->type == BKPT_HARD)
+ {
+ xscale->ibcr_available--;
+ }
+
return ERROR_OK;
}
Index: src/target/xscale.c
===================================================================
--- src/target/xscale.c (revision 1214)
+++ src/target/xscale.c (working copy)
@@ -2262,10 +2262,6 @@
LOG_INFO("no breakpoint unit available for hardware
breakpoint");
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
}
- else
- {
- xscale->ibcr_available--;
- }
if ((breakpoint->length != 2) && (breakpoint->length != 4))
{
@@ -2273,6 +2269,11 @@
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
}
+ if (breakpoint->type == BKPT_HARD)
+ {
+ xscale->ibcr_available--;
+ }
+
return ERROR_OK;
}
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development