This is an automated email from Gerrit.

Matej Kupljen (matej.kupl...@gmail.com) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/2545

-- gerrit

commit 8834eae290fc1b396bdf6e659dabe178b102ae63
Author: Matej Kupljen <matej.kupl...@gmail.com>
Date:   Wed Feb 11 09:28:41 2015 +0100

    topic: Problem with GDB protocol
    
    I couldn't make OpenOCD to work with GDB. I was always getting this in GDB:
    (gdb) target remote localhost:3333
    Remote debugging using localhost:3333
    Ignoring packet error, continuing...
    Ignoring packet error, continuing...
    Ignoring packet error, continuing...
    Ignoring packet error, continuing...
    Malformed response to offset query, timeout
    (gdb)
    While debugging gdb remote protocol, I have seen that gdb responds with:
    w ++$?#3f
    And those two '+' seems to confuse the OpenOCD parser, if it sees another
    '+' sign it emits the DEBUG output and sets the noack_mode to 2. The
    problem is that we weren't even IN noack mode, this was set to 0 and then
    it explicitly sets it to 2 and thus turning the noack mode on.
    
    Change-Id: If267c9226e57fa83121ded09cf69829f8f0b4b93
    Signed-off-by: Matej Kupljen <matej.kupl...@gmail.com>

diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 152a06c..b878826 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -626,11 +626,14 @@ static int gdb_get_packet_inner(struct connection 
*connection,
                                         * warning. This code makes server 
ignore the first ACK
                                         * that will be received after going 
into noack mode,
                                         * warning only about subsequent ACK's. 
*/
-                                       if (gdb_con->noack_mode > 1) {
-                                               LOG_WARNING("acknowledgment 
received, but no packet pending");
-                                       } else {
-                                               LOG_DEBUG("Received first 
acknowledgment after entering noack mode. Ignoring it.");
-                                               gdb_con->noack_mode = 2;
+                                       if(gdb_con->noack_mode)
+                                       {
+                                               if (gdb_con->noack_mode > 1) {
+                                                       
LOG_WARNING("acknowledgment received, but no packet pending");
+                                               } else {
+                                                       LOG_DEBUG("Received 
first acknowledgment after entering noack mode. Ignoring it.");
+                                                       gdb_con->noack_mode = 2;
+                                               }
                                        }
                                        break;
                                case '-':

-- 

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to