mdw/mww is broken. Attached is a patch that fixes it.

The reason I didn't push it already is that there were explicit
patches that surgically broke mdw/mww recently :-)

What's going on?

-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
From 14770d06c547e93759741288254421bbd6b433d7 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?=C3=98yvind=20Harboe?= <[email protected]>
Date: Wed, 18 Nov 2009 09:09:18 +0100
Subject: [PATCH] target: mww/mdw rewrite syntax error gaffe
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

The latest rewrite accidentally broke the check for what subtype
the mdw/mww was(byte, halfword or word).

Signed-off-by: Øyvind Harboe <[email protected]>
---
 src/target/target.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/target/target.c b/src/target/target.c
index bf83da0..1fc9820 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2249,7 +2249,7 @@ COMMAND_HANDLER(handle_md_command)
 
 	unsigned size = 0;
 	const char *cmd_name = CMD_NAME;
-	switch (cmd_name[6]) {
+	switch (cmd_name[2]) {
 	case 'w': size = 4; break;
 	case 'h': size = 2; break;
 	case 'b': size = 1; break;
@@ -2327,7 +2327,7 @@ COMMAND_HANDLER(handle_mw_command)
 	struct target *target = get_current_target(CMD_CTX);
 	unsigned wordsize;
 	uint8_t value_buf[4];
-	switch (cmd_name[6])
+	switch (cmd_name[2])
 	{
 		case 'w':
 			wordsize = 4;
-- 
1.6.3.3

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to