diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-05 01:47:44 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-05 01:47:44 -0800 |
commit | 98788d7a75b4321c96845a8fbf814f254a6cf153 (patch) | |
tree | c6014a3a74bb8d9b4ad34a6448f077e27681cbe5 /src/target/cortex_m3.c | |
parent | 16b4b8cf5453660c849546ebf8a0c3a5a082329e (diff) |
watchpoint_add() cleanup
Fail watchpoint_add() if it's the same address but the
parameters are different ... don't just assume having
the same address means the same watchpoint! (Note that
overlapping watchpoints aren't detected...)
Handle unrecognized return codes more sanely; don't exit()!
And describe command params right.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/cortex_m3.c')
-rw-r--r-- | src/target/cortex_m3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index eb37add3..51481a98 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -1199,7 +1199,7 @@ cortex_m3_add_watchpoint(struct target_s *target, watchpoint_t *watchpoint) unsigned mask; for (mask = 0; mask < 16; mask++) { - if ((1 << mask) == watchpoint->length) + if ((1u << mask) == watchpoint->length) break; } if (mask == 16) { |