From: Brian Campbell Date: Wed, 21 Dec 2016 17:53:45 +0000 (+0000) Subject: Fix gdb communication error (#82) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7647707a60787c31210794340ee9399c2357df6a;p=riscv-isa-sim.git Fix gdb communication error (#82) --- diff --git a/riscv/gdbserver.cc b/riscv/gdbserver.cc index 3e68872..4303adf 100644 --- a/riscv/gdbserver.cc +++ b/riscv/gdbserver.cc @@ -325,7 +325,7 @@ void circular_buffer_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); } }