On Mon, Jan 11, 2010 at 9:27 AM, David Brownell <davi...@pacbell.net> wrote:
> On Monday 11 January 2010, Øyvind Harboe wrote:
>> How's this patch?
>
> Maybe if you passed wp_type not bp_type ... ?

Thanks. Fixed. I meant well. :-)




-- 
Øyvind Harboe
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
From d3453a220692d4bdfb2eeae083aff468cc0d78b5 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?=C3=98yvind=20Harboe?= <oyvind.har...@zylin.com>
Date: Mon, 11 Jan 2010 09:22:08 +0100
Subject: [PATCH] gdbserver: fix typo that broke read/write watchpoint
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

It looks like a bugfix from normal breakpoints was not
copied over.

Do not use clever mathematics and assumptions to convert from
GDB enum for break/watchpoints to OpenOCD enum.

Signed-off-by: Øyvind Harboe <oyvind.har...@zylin.com>
---
 src/server/gdb_server.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 08daa68..da14b40 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -1484,7 +1484,7 @@ int gdb_breakpoint_watchpoint_packet(struct connection *connection, struct targe
 		{
 			if (packet[0] == 'Z')
 			{
-				if ((retval = watchpoint_add(target, address, size, type-2, 0, 0xffffffffu)) != ERROR_OK)
+				if ((retval = watchpoint_add(target, address, size, wp_type, 0, 0xffffffffu)) != ERROR_OK)
 				{
 					if ((retval = gdb_error(connection, retval)) != ERROR_OK)
 						return retval;
-- 
1.6.3.3

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to