Fix gdb communication error (#82)
authorBrian Campbell <bacam@z273.org.uk>
Wed, 21 Dec 2016 17:53:45 +0000 (17:53 +0000)
committerAndrew Waterman <aswaterman@gmail.com>
Wed, 21 Dec 2016 17:53:45 +0000 (09:53 -0800)
riscv/gdbserver.cc

index 3e68872b3cbcb52310921d431f3deced74eccea8..4303adfed38a6cbecbf8cce251a2f397331e4f80 100644 (file)
@@ -325,7 +325,7 @@ void circular_buffer_t<T>::append(const T *src, unsigned int count)
   count -= copy;
   if (count > 0) {
     assert(count < contiguous_empty_size());
-    memcpy(contiguous_empty(), src, count * sizeof(T));
+    memcpy(contiguous_empty(), src+copy, count * sizeof(T));
     data_added(count);
   }
 }