Hello,
Zach Welch pisze:
On Sat, 2009-11-14 at 12:45 -0600, Dean Glazeski wrote:
Hi all,
It appears that with Zach's recent command handler work the MWW
command broke. The reason is because of how the args pointer is
modified (incremented in this case) as the function executes. It then
uses the CMD_NAME macro and this retrieves 'phys' instead of 'mww'.
In addition, it appears that the command name is now 'ocd_mww', so the
index for the w, h, or b character now needs to be 6 instead of 2.
Patch is attached.
Whoops. Thanks for catching this. That was an unexpected consequence,
though I should have realized it when I looked at that routine. Pushed.
Seems that mdw command is broken too. Patch attached.
BR,
Krzysztof
diff --git a/src/target/target.c b/src/target/target.c
index 6ecf16a..2385d0f 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2256,7 +2256,8 @@ COMMAND_HANDLER(handle_md_command)
return ERROR_COMMAND_SYNTAX_ERROR;
unsigned size = 0;
- switch (CMD_NAME[2]) {
+ const char *cmd_name = CMD_NAME;
+ switch (cmd_name[6]) {
case 'w': size = 4; break;
case 'h': size = 2; break;
case 'b': size = 1; break;
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development