diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-12-05 17:37:23 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-12-05 17:37:23 +0000 |
commit | d571e92abaa00a460c4106376734e22249708c70 (patch) | |
tree | 076edd765a73ba97429209cecebbe427f039dbba | |
parent | d89fe56507257c3e2133f843ad2e5e4f6a03795d (diff) | |
download | openocd_libswd-d571e92abaa00a460c4106376734e22249708c70.tar.gz openocd_libswd-d571e92abaa00a460c4106376734e22249708c70.tar.bz2 openocd_libswd-d571e92abaa00a460c4106376734e22249708c70.tar.xz openocd_libswd-d571e92abaa00a460c4106376734e22249708c70.zip |
Karl Beldan <karl.beldan@gmail.com> - The ibcr count for hw instruction breakpoint registers was decremented
with soft breakpoints and breakpoint length error.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1215 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/target/xscale.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/target/xscale.c b/src/target/xscale.c index 02220470..ef476027 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -2262,10 +2262,6 @@ int xscale_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint) 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 @@ int xscale_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint) return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } + if (breakpoint->type == BKPT_HARD) + { + xscale->ibcr_available--; + } + return ERROR_OK; } |