From: Michael Pratt Date: Sun, 19 Aug 2012 16:19:25 +0000 (-0400) Subject: Fix watchpoint support X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=684d76afa0f36d9c9cc3974f11fd42aa95e22c02;p=fw%2Fstlink Fix watchpoint support Setting of watchpoints was nested inside of a case statement, so it would only run for that case, even though it supports all cases. --- diff --git a/gdbserver/gdb-server.c b/gdbserver/gdb-server.c index ae06952..e6368ea 100644 --- a/gdbserver/gdb-server.c +++ b/gdbserver/gdb-server.c @@ -1108,13 +1108,14 @@ int serve(stlink_t *sl, int port) { wf = WATCHREAD; } else { wf = WATCHACCESS; - if(add_data_watchpoint(sl, wf, addr, len) < 0) { - reply = strdup("E00"); - } else { - reply = strdup("OK"); - break; - } } + + if(add_data_watchpoint(sl, wf, addr, len) < 0) { + reply = strdup("E00"); + } else { + reply = strdup("OK"); + break; + } } default: