summaryrefslogtreecommitdiff
path: root/src/target/target.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-05 01:47:44 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-05 01:47:44 -0800
commit98788d7a75b4321c96845a8fbf814f254a6cf153 (patch)
treec6014a3a74bb8d9b4ad34a6448f077e27681cbe5 /src/target/target.c
parent16b4b8cf5453660c849546ebf8a0c3a5a082329e (diff)
downloadopenocd+libswd-98788d7a75b4321c96845a8fbf814f254a6cf153.tar.gz
openocd+libswd-98788d7a75b4321c96845a8fbf814f254a6cf153.tar.bz2
openocd+libswd-98788d7a75b4321c96845a8fbf814f254a6cf153.tar.xz
openocd+libswd-98788d7a75b4321c96845a8fbf814f254a6cf153.zip
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/target.c')
-rw-r--r--src/target/target.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/target/target.c b/src/target/target.c
index 2a66fcf1..55fc2c82 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2988,7 +2988,8 @@ static int handle_wp_command(struct command_context_s *cmd_ctx, char *cmd, char
break;
default:
- command_print(cmd_ctx, "usage: wp <address> <length> [r/w/a] [value] [mask]");
+ command_print(cmd_ctx, "usage: wp [address length "
+ "[(r|w|a) [value [mask]]]]");
return ERROR_COMMAND_SYNTAX_ERROR;
}