From 727dba872b5a17c070ebc5c44d927ad6743acc19 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Tue, 22 Mar 2011 15:52:31 +0800 Subject: updated gdb command checking assert logic --- Host/nxt-gdb-server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Host/nxt-gdb-server.py b/Host/nxt-gdb-server.py index 67e93b8..a72055f 100755 --- a/Host/nxt-gdb-server.py +++ b/Host/nxt-gdb-server.py @@ -73,7 +73,10 @@ class NXTGDBServer: # Is # found and enough place for the checkum? while end >= 0 and end < len (self.in_buf) - 2: msg, self.in_buf = self.in_buf[0:end + 3], self.in_buf[end + 3:] - assert msg[0] == '$', "not a GDB command" + gdbprefix = msg[0] + if gdbprefix in ['+', '-']: + gdbprefix = msg[1] + assert gdbprefix == '$', "not a GDB command" # Make segments. seg_no = 0 while msg: -- cgit v1.2.3